in reply to Re^2: Testing for readdir failure (Perl-bug)
in thread Testing for readdir failure
------ 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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Testing for readdir failure (perlbug errno test without localizing)
by Anonymous Monk on May 26, 2013 at 00:20 UTC | |
by LanX (Saint) on May 26, 2013 at 00:56 UTC | |
by Bob Cook (Acolyte) on May 30, 2013 at 20:38 UTC |