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 | |
by Abigail-II (Bishop) on Jul 16, 2003 at 22:12 UTC | |
by Anonymous Monk on May 26, 2009 at 15:18 UTC |
In Section
Cool Uses for Perl