You are viewing the version of this documentation from Perl blead. This is the main development branch of Perl. (git commit 233e70e50b57acf34a1003a191ae9a57e8706973)
%OS_ERROR
%ERRNO
%!

Each element of %! has a true value only if $! is set to that value. For example, $!{ENOENT} is true if and only if the current value of $! is ENOENT; that is, if the most recent error was "No such file or directory" (or its moral equivalent: not all operating systems give that exact error, and certainly not all languages). The specific true value is not guaranteed, but in the past has generally been the numeric value of $!. To check if a particular key is meaningful on your system, use exists $!{the_key}; for a list of legal keys, use keys %!. See Errno for more information, and also see "$!".

This variable was added in Perl 5.005.