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.
In reply to Re^3: Collapsing multiple file open/close
by ikegami
in thread Collapsing multiple file open/close
by ady
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |