in reply to Re^2: Collapsing multiple file open/close
in thread Collapsing multiple file open/close
There are two problems with that:
1) Creating symbols dynamically (FH$i) is pretty bad. I think you could use $FH{$i} instead (since Perl 5.6?), but your loop would become
while (<$FH{''}>) { print $FH{1} $_; }
2) You're opening both files for reading.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Collapsing multiple file open/close
by ady (Deacon) on Apr 13, 2005 at 16:53 UTC |