in reply to Re^2: read value from file won't pass if exists??
in thread read value from file won't pass if exists??
In general, you don't need to call close yourself in a small script. Perl will close all open file handles when the script finishes. Additionally, if you open the same filehandle with a different file, Perl will close the first one for you first. If you're writing a large program, you can sometimes run into a limit on the total number of files you can have open at once, so it's a good habbit to close anything you have open when you're done with it, but it generally won't do any harm if you don't.