System Error Constants

Perl's 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

Get Network Programming with Perl now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.