Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: List standard Unix error codes

by Abigail-II (Bishop)
on Jul 16, 2003 at 20:53 UTC ( #275034=note: print w/ replies, xml ) Need Help??


in reply to List standard Unix error codes

Here's a way to get the symbolic names as well:
#!/usr/bin/perl use strict; use warnings; use Errno; foreach my $err (keys (%!)) { $! = eval "Errno::$err"; printf "%3d %20s %s\n", $! + 0, $err, $! } __END__

Note that the names are somewhat portable (it improves if you stick to the POSIX names), but the numbers and descriptions are not portable. Not even from one Unix to the other.

Abigail

Replies are listed 'Best First'.
Re: Re: List standard Unix error codes
by Anonymous Monk on Jul 16, 2003 at 21:25 UTC
    Now if it was only sorted somehow ;)
      I only had 2 minutes to write, test and post the program, because there was a television program I wanted to see. But feel free to modify the code, and post the results.

      Abigail

        Pipe it to sort -n and that will sort it for you...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-07-28 03:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (252 votes). Check out past polls.