in reply to Processing arrays 2 elements at a time (TIMTOWTDI)
It is only the artifact of using @_ in the sub call which avoids the copy.my @copy = @$r; while( @copy ) { push @$r2, [ shift @copy, shift @copy ]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Processing arrays 2 elements at a time (TIMTOWTDI)
by ichimunki (Priest) on Aug 02, 2002 at 19:38 UTC | |
by petral (Curate) on Aug 02, 2002 at 21:50 UTC | |
by ichimunki (Priest) on Aug 02, 2002 at 22:38 UTC |