[ ... stuff ... ] my @baz = map { ( $_ , shift @bar ) } @foo; print STDOUT my @baz = map { ( $_ , shift @bar ) } @foo;