> file_1:
> 12
> 13
> 14
> 3
>
> file_2:
> 3
> 45
> 34
> 56
A real quick and dirty way of doing it:
-- 8< --
use strict;
open(FONE, $ARGV[0]);
open(FTWO, $ARGV[1]);
open(FOUT, ">$ARGV[2]");
my @f1;
my @f2;
my $c=0;
chomp(@f1=<FONE>);
chomp(@f2=<FTWO>);
close(FONE);
close(FTWO);
for($c=0;$c<scalar(@f1);$c++) {
print(FOUT $f1[$c]." ".$f2[$c]."\n");
}
close(FOUT);
-- 8< --
works on only two files at a time so it might not be all that useful.
Also if the 2nd file is larger than the first one, it'll break.
YMMV and such.
--
Bernhard van Staveren - madcat(at)ghostfield.com
GhostField Internet - http://www.ghostfield.com/
"A witty saying proves nothing, but damn it's funny!" - me, 1998
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]