Here's to hoping that more of Functional makes it into perl6.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>] );;
_________
broquaint
update: added chomp() and extra space per dada's request
In reply to Re: joining files
by broquaint
in thread joining files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |