in reply to Returning lists vs arrays


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
sub list { return(1,2); }
is not often used

sub arrays { @A = (1,2); return (\@A); }
is something often to use in sub