System Error Constants

Perl's Errno.pm module exports system error constants for use with the $! variable. When evaluated in a numeric context, $! returns the error constant listed in the first column of Table B.1. In a string context, $! returns the human-readable message given in the second column.

Table B.1. lists error messages that will be seen in a version of Perl compiled under Linux and glibc version 2.1 but that are reasonably well standardized across other UNIX variants. The Macintosh and Windows ports recognize a subset of these constants. Additionally, these ports have platform-specific errors that are reported in the $^E variable.

Table B.1. Linux and glibc Error Messages
Error Constant Message
E2BIG Arg list too long
EACCES ...

Get Network Programming with Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.