in reply to joining files
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: joining files
by dada (Chaplain) on Oct 17, 2002 at 13:28 UTC |