Other Perl Globals
Table B.3 lists other Perl globals used in the body of this book. The first column is the Perl punctuation variable, and the second is its English-language equivalent when the English module is loaded.
Variable | English | Description |
---|---|---|
$? | $CHILD_ERROR | Status returned by the last pipe close, backtick, or successful call to wait(); a status of 0 generally indicates that the child terminated without error |
$! | $ERRNO | Error message from the last failed system call |
$^E | $EXTENDED_OS_ERROR | Extended error information from non-UNIX operating systems |
$<digit> | Last matched subexpression from a successful pattern match (e.g., $1, $2) | |
$& | $MATCH | Entire string matched by the last successful pattern match |
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.