OK Chase,
I saw the missing quotes:)
I sniped out the later work using the other elements of the array as to much 
was broken! I do want to pass in an array and work with all of it.
So if I wanted to work with only the first indices to start, is this correct:
sub stop_it {
        my ($vm) = @_[0];
        my $state = `/usr/bin/vmware-cmd \""$vm"\" getstate -q`;
        .
        .
        .
}
But, the system executed command needs to see "itself" that is, quotes around 
the value of $vm. Basically I need to pass the shell this:
Vmware-cmd "/path/to/file/name.vmx" getstate -q
So did I write that correct for both situations?





In your next email, you say this:
sub stop_it {
    for my $vm (@_) {
        my $state = `/usr/bin/vmware-cmd "$vm" getstate -q`;
        .
        .
        .
    }
}

But I don't want to pass all indices to each section in the sub, each section 
does something with either one, or a specific few of the indices, later I 
direct for example, 2 and 3 into a loop.

Thanks!
jlc



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to