in reply to joining to files into columns
use strict; use warnings; open(IN, "file1") || or die $!; open(IN2, "file2") || or die $!; open(OUT, ">>joinfile") || or die $!; while(defined(my $f1 = <IN>) { chomp $f1; my $f2 = <IN2>; print OUT "$f1 $f2"; }
That ought to do the trick. It is always good practice to put use strict; and use warnings; at the beginning of your scripts to help catch errors. Also, did you mean to append to "joinfile" with your use of >>? Use a single > to write to a new file or overwrite an existing one.
Cheers,
JohnGG
|
|---|