![]() |
|
XP is just a number | |
PerlMonks |
Re: Arrays and Scalar Parametersby ozone (Friar) |
on Aug 20, 2001 at 22:44 UTC ( #106304=note: print w/replies, xml ) | Need Help?? |
You can't easily return an array and a scalar - the array is going to consume all the returned values (the scalar included). In this case it's best to just return a ref to the array as well as the scalar like so: Without using references you would have to do something like this: Messy, but it would get the job done.
In Section
Seekers of Perl Wisdom
|
|