Problems? Is your data what you think it is? | |
PerlMonks |
Re: I've read perlrefby maa (Pilgrim) |
on Mar 11, 2004 at 11:27 UTC ( [id://335765]=note: print w/replies, xml ) | Need Help?? |
and why you can only return one value from a subroutine? You can return as many values as you like from a sub in list context. How do you think split etc work? why perl uses references to pass arrays? Because it's easier... and more efficient. It's also the best way to return multple arrays from a sub... return \@a1, \@a2; UPDATE: just noticed that you have not QUOTED your array values... and values is a perl keyword!
In Section
Seekers of Perl Wisdom
|
|