How do you call ScriptB? Or should I say, when do you call ScriptB?
Files created with File::Temp may get removed as soon as the File::Temp object (file handle) goes out of scope (at least as long as you use, as you do, UNLINK=>1). So, are you sure the file handle is still live in scriptA when ScriptB tries to open the file by name?
Update: Rereading your code, I note that the functions are closures, so unless you have code to explicitly undef or assign to $tmpParamFileHandle, they're likely to keep the file handle alive. Until global cleanup, that is. So, I guess the question is: Are you sure ScriptB is trying to open this file before scriptA exits?
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
In reply to Re: Using File::Temp Names
by Sidhekin
in thread Using File::Temp Names
by novicepl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |