------ Error: on --- Reset: off $! 17: File exists
I included all cases for completeness and to make it easier to find the bug.
Maybe this is clearer:
DB<105> $!=666 => "Unknown error 666" DB<106> $!=666;scalar readdir X or warn "$!\n" Unknown error 666 DB<107> $!=undef;scalar readdir X or warn "$!\n" Bad file descriptor
As you can see $! needs to be reset in advance "to be meaningful".
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re^3: Testing for readdir failure (Perl-bug)
by LanX
in thread Testing for readdir failure
by Bob Cook
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |