in reply to How to test for open file handles?
{ open(my $FH, "<", $filename) or die("Cannot open: $filename\n $!"); while (<$FH>) { ... }; # unnecessary - $FH gets closed once it leaves lexical scope #close($FH); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to test for open file handles?
by mikegrb (Initiate) on Feb 04, 2009 at 14:21 UTC |