in reply to Re: Deleting a File
in thread Deleting a File

>Note that the permissions on the data file itself do not matter for "unlink" -- only the permissions on the directory containing the data file are important.

No, that's UNIX. On Windoze, to quote the MSDN:"To delete or rename a file, you must have either delete permission on the file or delete child permission in the parent directory".
An attempt to delete an open file will fail, and that is probably what is happening here.

Replies are listed 'Best First'.
Re^3: Deleting a File
by polettix (Vicar) on Jun 20, 2007 at 10:21 UTC
    This is probably Yet Another Good Reason to get rid of package-level filehandles in favour of lexical ones (even though we were not shown the code for Read_File, the use of package-level directory handles is a hint). It really strucks me that lexical filehandles were supported since 5.6 and yet the vast majority of the examples use non-lexical ones.

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.