Achilles_Sea has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks:
the following code will print 123456789, leaving @array2 empty.
I wonder why PERL will join the 2 array parameters into array1, and how could I pass several list to a sub routine?mysub((1..5),(6..9)); sub mysub{ my (@array1,@array2) = @_; print @array1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: why perl joins multy list parameters to one list
by JavaFan (Canon) on Oct 18, 2011 at 11:22 UTC | |
by Achilles_Sea (Novice) on Oct 18, 2011 at 13:12 UTC | |
|
Re: why perl joins multy list parameters to one list
by moritz (Cardinal) on Oct 18, 2011 at 11:34 UTC |