On 7/4/07, Chas Owens <[EMAIL PROTECTED]> wrote:
snip
snip
> The second I am sure is the darn () in the file names I am feeding
> into the function. Can someone shed some light :) I need to call the
> first indices of many arrays that get passed into this function, so I
> was thinking $_[0] was what I need. Problem is that the execution
> of vmware-cmd needs the value of $_[0] passed to it inside quotes.
snip
snip

also,   'vmware-cmd $_[0] stop soft'; is missng the quotes around $_[0].

And while I am thinking about it, Don't use $_[0].  It is good form to
handle assigning arguments to lexical variables early in a subroutine:

sub stop_it {
       my ($vm) = @_;
       my $state = `/usr/bin/vmware-cmd "$vm" getstate -q`;
       .
       .
       .
}

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


Reply via email to