Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: snip if ($state == 'on') { 'vmware-cmd $_[0] stop soft'; my $tools = `/usr/bin/vmware-cmd \"$_[0]\" gettoolslastactive -q`; chomp

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
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 w

RE: syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
? So the `/usr/bin/vmware-cmd \"$_[0]\" gettoolslastactive -q`; is correct where the var gets inserted? Thanks! jlc -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 04, 2007 8:15 PM To: Joseph L. Casale Cc: beginners@perl.org Subject: Re: synta

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: snip Is it actually incorrect to run: stop_it(@DNS); aside from maybe looking strange? snip It doesn't look strange, but your code only works with the first element of @DNS so it is pointless. If you want to say stop_it(@DNS) and actually

RE: syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
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];

RE: syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
Heh, I am running out of hair:P I get two errors to start, one is the warning that is better write: my ($vm) = $_[0]; instead of my ($vm) = @_[0]; And the other is about the use of the global @_ (huh) with "my"? I have this now: #!/usr/bin/perl -w @Exchange = ("/vmfs/volumes/467f06a5-7d59c067-35

RE: syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
Heh, Clearly I need to sleep! This doesn't even work either? #!/usr/bin/perl -w @list = (Exchange,Filter,DNS,Domain) sub stop_it { $vm = $_[0]; print "$vm\n"; } stop_it(@list) What is wrong here? jlc -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: Heh, Clearly I need to sleep! This doesn't even work either? #!/usr/bin/perl -w @list = (Exchange,Filter,DNS,Domain) snip You are missing your quotes. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: Heh, I am running out of hair:P I get two errors to start, one is the warning that is better write: my ($vm) = $_[0]; instead of my ($vm) = @_[0]; The proper way to say this is my ($vm) = @_; And looking at your data I would suggest my (

RE: syntax error of some sort?

2007-07-04 Thread Prabu Ayyappan
@list = (Exchange,Filter,DNS,Domain); sub stop_it { $vm = $_[0]; print "$vm\n"; } stop_it(@list) A semi-colon is missing in the list assignment. if you want to get the first value of the list then you have to use $_[0] Second Value means $_[1] and so on..

RE: syntax error of some sort?

2007-07-04 Thread Prabu Ayyappan
@list = (Exchange,Filter,DNS,Domain); sub stop_it { $vm = $_[0]; print "$vm\n"; } stop_it(@list) A semi-colon is missing in the list assignment. if you want to get the first value of the list then you have to use $_[0] Second Value means $_[1] and so on..

RE: syntax error of some sort?

2007-07-05 Thread Joseph L. Casale
; beginners@perl.org Subject: RE: syntax error of some sort? @list = (Exchange,Filter,DNS,Domain); sub stop_it { $vm = $_[0]; print "$vm\n"; } stop_it(@list) A semi-colon is missing in the list assignment. if you want to get the first value of the list then you have to u