in reply to Will recursive code update data in an array?
If the array has wider scope than the subroutine, then yes. Unrealistic sample follows:
my @array = (); my $counter =0; recurse(); sub recurse { push @array, $counter++; return if $counter > 25; recurse(); }
|
|---|