Not that way, no. Filehandles (of that form) are global and when you reopen one the previous file is closed. Either localize it with, erm, local or use a lexical handle (given a new enough Perl).
open( my $hosts_fh, "<", $file ) or die "probelm opening '$file': $!\n +";
In reply to Re: recursive file open
by Fletch
in thread recursive file open
by solitaryrpr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |