in reply to Returning lists vs arrays
Hi,
The list is not aplaceholder ,just a set of values and for returning a set of values , an array or an arrayref is better than a list and any fuction returns a set of variable values which are not constants and hence an array is better and mostly used than list
The list is not aplaceholder ,just a set of values and for returning a set of values , an array or an arrayref is better than a list and any fuction returns a set of variable values which are not constants and hence an array is better and mostly used than list
is not often usedsub list { return(1,2); }
is something often to use in subsub arrays { @A = (1,2); return (\@A); }
|
---|
In Section
Seekers of Perl Wisdom