Unless the documentation specifically says how it handles $!, you should think of it as the last thing that failed, somewhere buried deep down in the code you called.
Update:I spoke to soon wrt docs. I noticed that the readline docs do say they set $! on an error, but they don't directly mention what they return. In an example it seems to imply that the return value is undef in that case.
In reply to Re: readline succeeds but sets $! = EBADF
by bluto
in thread readline succeeds but sets $! = EBADF
by ambrus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |