in reply to Re^2: Unlinking a file when the file doesnt exist
in thread Unlinking a file when the file doesnt exist

Unfortunately, $! is garbage in that example.

It contained the right value when I tried it. Is that platform (or perl version) dependent?

  • Comment on Re^3: Unlinking a file when the file doesnt exist

Replies are listed 'Best First'.
Re^4: Unlinking a file when the file doesnt exist
by ikegami (Patriarch) on Mar 22, 2011 at 21:31 UTC

    It may have the right value if you're lucky. stat is free to change it, and you can reach the die even if unlink was successful.