Reply to Message

View discussion in a popup

Replying to:
Trondesson
Contributor
Contributor

Ok. Now my code looks like this:

my $vms = Vim::find_entity_views(view_type => 'VirtualMachine', properties => ['summary.customValue',], );

for my $vm (@$vms) {

        my $cv_ref = $vm->{'summery.customValue'};

        next unless defined($vm->{'summary.customValue'});

        print $vm->name . "\n";

        for (@$cv_ref) {

                next unless defined $_->value;

                print "key: ",$_->key,"\tvalue: ",$_->value,"\n";

        }

}

For line 6 I got the following error when I tried to run my script.

Use of uninitialized value in concatenation (.) or string at ./SnapshotReminder.pl

I think I have to use something different than "name".

Thank you for your patience.

Reply
0 Kudos