Pekka Niiranen <> wrote in news:4100130f$0
$13046$:
> and then exits back to Perl. When I then try to remove
> the created "tempfile" from the same Perl script with
> "unlink" I find out that Perl does not have access rights to the file.
> If I use "readdir" Perl finds the file but nor command
> "system(rm $file)" or "unlink($file)" does not work either. However,
> when Perl script exits I can remove the file with
> normal Bash shell command: "rm tempfile".
>
> It seems that Perl is running with different user rights
I find that highly unlikely.
> than the Shell script. My question is therefore: "How can I remove file
> created by the Bash shell script started as subshell from Perl script?"
> Should I start another Shell script that executes "rm tempfile"
> just for that task?
In addition to Anno's suggestions, I have one question. Do you read from
the tempfile in your Perl script. If you do, does your script close the
file handle before attempting to call unlink?
--
A. Sinan Unur
d
(remove '.invalid' and reverse each component for email address)