in reply to Switch the odd/even elements of an array
sub swap{ reverse( shift, shift ), @_ ? swap( @_ ) : (); } print swap( 1 .. 8 );; 2 1 4 3 6 5 8 7
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Switch the odd/even elements of an array
by wind (Priest) on Mar 04, 2011 at 21:27 UTC | |
by johngg (Canon) on Mar 06, 2011 at 01:04 UTC | |
by wind (Priest) on Mar 06, 2011 at 05:00 UTC | |
by johngg (Canon) on Mar 06, 2011 at 17:37 UTC |