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 use $_[0

syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
I have the following code (it's a snippet so it may seem silly, but altogether it would make sense as I am forcing one array into it for a test): #!/usr/bin/perl -w @DNS = (/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/Web DNS (Win2003 Std x32)/Web DNS (Win2003 Std

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`;

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 what I

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: syntax error

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 =

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...