Perl magic variable containing last error message (in string context) or its corresponding error number (in numeric context, thanks Ariels).

Also $OS_ERROR and $ERRNO.

Back to Perl