velocitygirl13 has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone. I'm new here. I have a question. I have a Perl script which runs perfectly in a Unix environment. However, when I run it in windows, I get an error that the temp file the script creates cannot be deleted because "Permission Denied". I tweaked my Windows permissions and gave every last user on my system full access to the temp directory where the temp files are created. I ran the script again and I still get permission denied. I seem to think that for some reason Windows or Perl is not honoring the close command I have in the script which causes the file to stay open and not be able to be deleted. The script creates the temp directory and files with no issues which means the script can write to the temp directory. It just can't delete the files it put there. The following is the snip of relevant code with some notes from me. My notes are in CAPS so you guys will know they are not part of the script. Thanks in advance for your help.
THIS WORKS WITHOUT ISSUE:
# create our temp file, $filename will contain the full path
my ($fh, $filename) = tempfile( DIR => $self->{Temp_Dir} );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Close command not being honored
by Corion (Patriarch) on Feb 21, 2014 at 15:24 UTC | |
by tye (Sage) on Feb 22, 2014 at 01:34 UTC | |
by velocitygirl13 (Novice) on Feb 21, 2014 at 15:50 UTC | |
by Corion (Patriarch) on Feb 21, 2014 at 16:01 UTC | |
by velocitygirl13 (Novice) on Feb 21, 2014 at 16:17 UTC | |
by velocitygirl13 (Novice) on Feb 28, 2014 at 15:09 UTC | |
|
Re: Close command not being honored
by walto (Pilgrim) on Feb 21, 2014 at 15:23 UTC | |
by velocitygirl13 (Novice) on Feb 21, 2014 at 15:51 UTC |