in reply to Pass by ref an array weirdness
Because it's parsed as @{$_}[1] - a slice (one element long, usually broken) of the array pointed to by the $_ variable.print "@$_[1]\n"; # Does Not work, why ?
The syntax is very predictable, once you learn the rules in perlref (and perlreftut).
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|