sub rev_array(@) { my @one = @_; my $length = @one; print "Length: $length\n"; my @two = (); while (my $entry = pop @one) { push @two, $entry; print "Push It!\n"; } return @two; }
In reply to Reversing an array. Subroutine. by Pearte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |