in reply to passing whole array to a function
Pass a reference to the array, either explicitly,
or else implicitly with a prototype,sub array_fn { my @array = @{+shift}; # ... } array_fn(\@foo);
The prototype version is generally reserved for subs which will modify their argument array.sub array_fn (\@) { my $array = shift; # do things to @$array } array_fn(@foo);
After Compline,
Zaxo
|
|---|