@in = (1,2,3,4,5,6,7,8,9,0); use Benchmark; timethese(100000, { 'C-style' => '#@in = (1,2,3,4,5,6,7,8,9,0); for my $i ( 0 .. $#in ) { $i % 2 ? $out2[int($i/2)] = $in[$i] : $out1[$i/2] = $in[$i]; }', 'push' => '#@in = (1,2,3,4,5,6,7,8,9,0); for my $i ( 0 .. $#in ) { $i % 2 ? push @out2, $in[$i] : push @out1, $in[$i]; }', 'destroy' => '@in = (1,2,3,4,5,6,7,8,9,0); while( @in ){ push @out1, shift(@in); push @out2, shift(@in); }' });