Help for this page
use strict; use warnings; ... # oops, handle FH is still open if an exception was thrown. my $line = <FH>; print "oops, FH is still open:$line\n";
use strict; use warnings; ... eval { fred() }; if ($@) { print "died: $@\n" } print "ok, \$fh is auto-closed when sub fred exits (normally or via di +e)\n";