in reply to Populate $!
There is no necessary correlation between what a child gets in its errno (which we see as $! in Perl) and what that child hands to exit(2) (which we get in the parent via $?). That they are both small numbers (errno under 100-ish, exit code one byte only) only adds to the confusion.
So, while this is a beautiful snippet for turning an arbitary errno value into an errno string, this has nothing to do with explaining why a child went boom.
-- Randal L. Schwartz, Perl hacker
|
|---|