Print a list of Unix error codes and descriptions such as those defined in errno.h.
perl -le 'print $!+0, "\t", $!++ for 0..127' Prints: 0 1 Operation not permitted 2 No such file or directory 3 No such process 4 Interrupted system call 5 Input/output error ...
Note that it isn't guaranteed that any given program will use these return values. On other OSes, $^E may give more relevant output than $!
Back to
Cool Uses for Perl