4 if (scalar @ARGV < 2) {
5 die "Usage: $0 file1.txt file2.txt ...\n\n Concatenate the nth line of each input file. All files\n must be the same length.\n\n";
11 open $fh, "<$file" or die "Can't read $file: $!\n";
15 my $first = shift @fhs;
17 while(my $x = <$first>) {
24 die "ERROR: Mismatched number of lines: $ARGV[$ind]\n" unless $x;
28 print join ' ||| ', @fields;
35 die "ERROR: $ARGV[$ind] has extra lines!\n" if $x;