in reply to parallel reading
Since others already gave you good general purpose suggestions...
#!/usr/bin/perl -l use strict; use warnings; my @fh=map { open my $fh, '<', $_ or die "Can't open `$_': $!\n"; $fh } @ARGV; while (@fh) { @fh=grep !eof $_, @fh; print map { chomp(my $line=<$_>); $line } @fh; } __END__
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: parallel reading
by roboticus (Chancellor) on May 09, 2006 at 19:15 UTC | |
by blazar (Canon) on May 10, 2006 at 08:54 UTC |
In Section
Seekers of Perl Wisdom