in reply to Deleting a File

There are a few things that would get in the way:

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.

Replies are listed 'Best First'.
Re^2: Deleting a File
by cdarke (Prior) on Jun 20, 2007 at 07:32 UTC
    >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.
      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.