Plus, the docs for $! state "after a failure". There is no definition for "failure" given
The docs are clear. $! is either set or it's value is meanlingless. Both the docs for the read system call and your own observations show that $! doesn't get set on EOF.
You could say the docs for readline override the docs for $!, but that's obviously not true.
If you don't care about portability, and you think it's safe enough for you, it's your call. Be sure to pick a value for $! that doesn't correspond to a valid errno on your system. Zero is probably a bad pick.
Could you please post the output of "uname -a" on the version of unix where you ran my test program
I'm using various versions of Perl on various versions of Windows.
In reply to Re^9: Best way to handle readline errors?
by ikegami
in thread Best way to handle readline errors?
by jrw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |