http://qs1969.pair.com?node_id=274896
Description: 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 $!