If used in numeric context, $! ($ERRNO) yields the value of the errno variable. In string context it yields the system error string.
$!
$ERRNO
errno
chdir "/home/typo" or die "chdir: $!\n";
The program terminates with chdir: No such file or directory.
chdir: No such file or directory