Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: List standard Unix error codes (less output, more code)

by tye (Cardinal)
on Jul 16, 2003 at 18:01 UTC ( #274958=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Win32:
    perl -e "print grep !/unknown error/i, map $_.qq'\t'.($!=$_).$/, 0..12
    +7"
    
    # Other:
    perl -e 'print grep !/unknown error/i, map $_."\t".($!=$_).$/, 0..127'
    
  2. or download this
    # Win32:
    perl -MErrno -e "my %e= map { Errno->$_()=>$_ } keys(%!); print grep !
    +/unknown error/i, map sprintf('%4d %-12s %s'.$/,$_,$e{$_},$!=$_), 0..
    +127"
    
    # Other:
    perl -MErrno -e 'my %e= map { Errno->$_()=>$_ } keys(%!); print grep !
    +/unknown error/i, map sprintf("%4d %-12s %s".$/,$_,$e{$_},$!=$_), 0..
    +127'
    
  3. or download this
       0
       1 EPERM        Operation not permitted
       2 ENOENT       No such file or directory
       3 ESRCH        No such process
       4 EINTR        Interrupted function call
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://274958]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2015-07-08 04:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls