in reply to Why do we need to close filehandles?
Imagine a filehandle as a door or lid of some sort, closeing the lid flushes the filehandle.
What happens if we open file and dont close the filehandle?
The filehandle remains open until the end of scope, or in the case of global filehandles, until the end of the program (die / exit / or else)
Where does it go?
It runs to the bitbucket.
|
|---|