for my $i (reverse(0..$#array/2)) { splice(@array, 2*$i+1, 0, "\n"); }