You close your files as soon as possible so that you can check for errors. This is needful especially when writing.
close $fh or die "could not close file: $!\n";
In reply to Re: Why do we need to close filehandles?
by shawnhcorey
in thread Why do we need to close filehandles?
by tej
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |