|We don't bite newbies here... much|
passing array referencesby cosmicperl (Chaplain)
|on Dec 04, 2004 at 14:01 UTC||Need Help??|
cosmicperl has asked for the wisdom of the Perl Monks concerning the following question:
This is something that has bothered me for a while, I'm suer there is a better way to do it.
I'm returning some scalars and array references:-
return ($scalar, \@array, $scalar1, \@array2);
I want to load them directly into other arrays and scalars. At the moment the only way I can do it is like this:-
Sometimes I'm passing a lot of values, so this way get's long winded. I'm sure there is a way to do it in a single line. Your perl wisdom is welcome.
P.S. Sometimes I'm passing the scalars as references as well. I want them loaded into normal scalars.