- or download this
use strict;
my @filenames = qw/one.txt two.txt three.txt/;
...
} ## end else [ if ( join '', @lines )
} ## end sub read_lines_parallel
- or download this
first line file 1
|line 1 file 2
|first line file 3
...
--------------------
||fourth line file 3
--------------------
- or download this
while (1) {
my $lines_ref = read_lines_parallel(@filehandles);
last unless $lines_ref;
print join '|', @$lines_ref;
print '-' x 20, "\n";
}
- or download this
while (my $lines_ref = read_lines_parallel(@filehandles)) {
# Do something with $lines_ref or @$lines_ref here
print join '|', @$lines_ref;
print '-' x 20, "\n";
}