$ perl -le " print glob 'foo/*'; warn sprintf q/ERRRR(%d)(%s)(%d)(%s)/, $!,$!,$^E,$^E; " ERRRR(22)(Invalid argument)(5)(Access is denied) at -e line 1. $ perl -le " print glob 'nonexist/*'; warn sprintf q/ERRRR(%d)(%s)(%d)(%s)/, $!,$!,$^E,$^E; " ERRRR(2)(No such file or directory)(3)(The system cannot find the path specified) at -e line 1. $ ls -loanh foo ls: reading directory ado: Permission denied total 0 $ ls -loanh nonexist ls: nonexist: No such file or directory