in reply to interleaving lists
This yields:use strict; use warnings; my @array_1 = qw(blorke gromble poomba); my @array_2 = qw(snork dumble gronke); my (@array_3); foreach (@array_1){ push @array_3, $_, shift(@array_2); } foreach (@array_3){ print "$_\n"; }
blorke snork gromble dumble poomba gronke
I am assuming here that your arrays are going to be the same size. You might want to check the size first. This also kills @array_2, so work on a copy if you need to keep the original.
----
Coyote
|
|---|