[EMAIL PROTECTED] wrote: > In a message dated 3/3/2004 5:15:57 AM Eastern Standard Time, > [EMAIL PROTECTED] writes: > >testsub(@abc, $x, $y); > > > >sub testsub(@$$) > >{ > > (@abc, $x, $y) = @_; > > print "Array @abc\n"; > > print "x $x\n"; > > print "y $y\n"; > >} > > sub testsub ([EMAIL PROTECTED]); > @abc = (1, 2, 3); > $x = 3; > $y = 4; > testsub @abc, $x, $y; #parens now optional
Yes, but at a price in clarity. What he is really passing in the above is a scalar. Especially for newcomers to the language, using an array symbol for the argument makes it harder to see the difference, IMHO. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>