aennen has asked for the wisdom of the Perl Monks concerning the following question:
@x=(a..z); @y=(0..9); &func(\@x, \@y); sub func() { my ($mx, $my) = @_; $z = $_[1]; print "@{$_[0]}\n"; # works print "@$_[1]\n"; # Does Not work, why ? print "@$z\n"; # works print "@$mx\n"; # works }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Pass by ref an array weirdness
by merlyn (Sage) on Dec 05, 2002 at 16:36 UTC | |
|
Re: Pass by ref an array weirdness
by sauoq (Abbot) on Dec 05, 2002 at 17:56 UTC | |
|
Re: Pass by ref an array weirdness
by bronto (Priest) on Dec 05, 2002 at 17:08 UTC |