use IO::File; use Functional qw( zip ); my $f1 = IO::File->new( shift ) or die("ack - $!"); my $f2 = IO::File->new( shift ) or die("ack - $!"); my $join = zip( [map { chomp; "$_ " } <$f1>], [<$f2>] );;