http://www.perlmonks.org?node_id=101326

eak has asked for the wisdom of the Perl Monks concerning the following question:

Is it possible to create variables in perl that have the contextual behavior of $!? In a string context it yields the system error string. In a numeric context it yields the current value of the last syscall error. It would be very could to be able to do this with my own variables. thanks, --eric