On 11-11-05 01:49 PM, Uri Guttman wrote:
readline isn't a system call so it can't set $!.
$! maps to the errno of system calls and has both the text and numeric
values of the actual error (only if one happens) of the last system
call. perl itself can trigger errors in system calls easily but the
internal errors don't set $! (they do set errno internally). e.g.
loading a file that doesn't exist will generate a perl error (which can
be caught with eval BLOCK) but the value of $! will still be meaningless.
I sorry but the function readline() will set $! on error. See `perldoc
readline`. $! will be undefined if no error occurs.
--
Just my 0.00000002 million dollars worth,
Shawn
Confusion is the first step of understanding.
Programming is as much about organization and communication
as it is about coding.
The secret to great software: Fail early & often.
Eliminate software piracy: use only FLOSS.
"Make something worthwhile." -- Dear Hunter
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/