Chas/Prabu,
The script is moving along nicely now:)
Incredible how I missed the obvious, although I have been staring at it for so 
long...

Thanks!
jlc

-----Original Message-----
From: Prabu Ayyappan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 04, 2007 11:16 PM
To: 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]

  Second Value means

  $_[1] and so on...

  To get all the values from the list..

  sub stop_it {
        (@vm) = @_;
        print "@vm\n";
}

  get it from @_ and assign it to an array "@vm" .Then you can navigate through 
the array with foreach or some for loops....

  @_ will have the arguments passed to the sub-routine.


  Hope this help you.

  Thanks,
  Prabu

"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)

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, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/





---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.




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


Reply via email to