trek1s has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I'm trying to make this piece of code work on MS Windows 2003 Server (ActivePerl 5.8.8):
#! perl use File::Temp; $File::Temp::KEEP_ALL = 1; # Tempfile to store command output. my $tf = new File::Temp(); my $tfname = $tf->filename; print "$tfname"; #print $tf "HELLO"; system("date /t >>$tfname");
But it fails with this error:
The process cannot access the file because it is being used by another process.I've tested the code on Linux and it works fine. Is module behaviour different from Win32 to linux? Am I missing something?
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File::Temp problems on Win32
by runrig (Abbot) on Jul 29, 2008 at 16:08 UTC | |
by tye (Sage) on Jul 30, 2008 at 01:44 UTC | |
by trek1s (Scribe) on Jul 29, 2008 at 16:17 UTC | |
by runrig (Abbot) on Jul 29, 2008 at 16:24 UTC | |
|
Re: File::Temp problems on Win32
by BrowserUk (Patriarch) on Jul 29, 2008 at 18:17 UTC |