use warnings; use strict; my @foo = ( 1 , 3 , 5 , 7 ); my @bar = (0, 2 , 4 , 6 , 8 ); my @foobar= map { $_, shift @foo } @bar; print STDOUT join(',', @foobar);