Today I was learning about the FileHandle module from CPAN, they have given the example like how to use
use FileHandle; $fh = new FileHandle "file", "r"; if (defined $fh) { print <$fh>; undef $fh; # automatically closes the file }
In this example they used 'undef' to close the named file handle, I changed the 'undef' as 'close' it works fine, whether undef and close are identical here ?
In reply to FileHandle: undef vs close by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |