in reply to Using File::Temp Names
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using File::Temp Names
by novicepl (Initiate) on Aug 01, 2006 at 03:35 UTC | |
by Sidhekin (Priest) on Aug 01, 2006 at 03:54 UTC | |
by novicepl (Initiate) on Aug 01, 2006 at 17:36 UTC | |
by Sidhekin (Priest) on Aug 01, 2006 at 18:11 UTC |