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
    Corion.. I can't thank you enough! That fixed my issue! You are wonderful!! I have been working on this for months with no luck. That was such a simple fix! Like I explained, I don't know much about Perl at all. Thanks to you, I can stop pulling my hair out.
Re^4: Close command not being honored
by velocitygirl13 (Novice) on Feb 28, 2014 at 15:09 UTC
    Corion, on the day you gave me this answer, it resolved my issue. I replied back to you, thanking you profusely for your help. I see that my reply never was posted so I wanted to take this time to make sure that you saw my "thank you!!". I had been struggling with that problem for a few weeks and you solved it in 3 seconds. That is why you are a PerlMonk and I'm a confused user. Again, I appreciate the help more than you know. Sincerely, thank you.