Another way to do it:
for ( 0 .. @array / 2 ) { my ( $lower, $upper ) = ( shift @array, pop @array ); push @other_array, $lower % 2 ? ( $upper, $lower ) : ( $lower, $up +per ); }
In reply to Re: Golf/Perlish solution to this problem?
by jwkrahn
in thread Golf/Perlish solution to this problem?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |