novicepl has asked for the wisdom of the Perl Monks concerning the following question:
When I pass getTempParamFileName() as a parameter to ScriptB, it says <temp file> file not found. <Temp file> is only available for ScriptA (from where it was created)?my $tmpParamFileName; my $tmpParamFileHandle; sub getTempParamFile(){ if(!defined $tmpParamFileHandle){ ($tmpParamFileHandle, $tmpParamFileName)=tempfile(UNLINK=>1); } return $tmpParamFileHandle; } sub getTempParamFileName(){ if(!defined $tmpParamFileName){ ($tmpParamFileHandle, $tmpParamFileName)=tempfile(UNLINK=>1); } return $tmpParamFileName; }
2006-08-01 Retitled by GrandFather, as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using File::Temp Names
by Sidhekin (Priest) on Aug 01, 2006 at 03:22 UTC | |
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 | |
|
Re: Using File::Temp Names
by bobf (Monsignor) on Aug 01, 2006 at 03:08 UTC | |
by novicepl (Initiate) on Aug 01, 2006 at 03:14 UTC | |
|
Re: Using File::Temp Names
by shmem (Chancellor) on Aug 01, 2006 at 09:46 UTC |