You're doing IO and a system call and this is a micro-optimization, so this is a lousy place to optimize, but if you want to close the filehandle unambiguously, use close directly. undef removes one reference count from the filehandle; other variables may point to the same filehandle and prevent Perl's GC from reclaiming it (and closing it implicitly).
Of course, if other variables point to the same filehandle and you close it explicitly underneath them, you may cause other problems.
In reply to Re^3: FileHandle: undef vs close
by chromatic
in thread FileHandle: undef vs close
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |