in reply to Uninitialized Value Error When Interleaving

The only way I could produce the error was if @foo was a shorter array than @bar.

@foo = ( 1 , 3 , 5 , 7 ); @bar = ( 2 , 4 , 6 , 8 , 9); print STDOUT my @foobar = map { ( $_, shift @foo ) } @bar;

Unfortunately, I don't know what you want to do if they are not the same size. So I'll guess:

@foo = ( 2 , 4 , 6 , 8 ); @bar = ( 1 , 3 , 5 , 7, 9); $len = @foo; print STDOUT my @foobar = ( (map { ( $_, shift @foo ) } @bar[0 .. $len - 1]), @bar[$len .. $#bar] );

HTH,
Charles K. Clarkson