in reply to Re^2: Close command not being honored
in thread Close command not being honored
The code
$SNF_fh->close
closes the filehandle $SNF_fh.
But further up, the call to tempfile returns a filehandle that you store in the variable $fh. You never show where $fh is closed.
If you are not interested in the filehandle and only in the name of the tempfile, immediately closing the filehandle returning from it is the sanest approach:
my ($fh, $filename) = tempfile( DIR => $self->{Temp_Dir} ); close $fh; # we only want the filename
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Close command not being honored
by velocitygirl13 (Novice) on Feb 21, 2014 at 16:17 UTC | |
|
Re^4: Close command not being honored
by velocitygirl13 (Novice) on Feb 28, 2014 at 15:09 UTC |