in reply to reading N files
This smacks of an XY Problem. Unless you are interleaving the files in some fashion, opening the file handles in advance does not seem like a good solution. If this is not a task requiring interleaving you might like to explain what you want to achieve so we can help with the larger problem.
BTW, you should generally use the three parameter open to avoid surprises. Your two open lines change to:
open (OUT, '>', $outfile') || ... and open (IN, '<' $_) || ...
Generally the usage line is better printed only when "required":
if (! @ARGV) { print "Usage: $0 output input1 input2 ...\n"; exit -1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: reading N files
by gri6507 (Deacon) on Jul 19, 2006 at 21:16 UTC | |
by graff (Chancellor) on Jul 20, 2006 at 01:37 UTC | |
by gri6507 (Deacon) on Jul 20, 2006 at 12:24 UTC |