Perl Module Errno
Published on 30 Nov 2007Tags #Perl
This module provides a variable containing the results for all known error constants:
-
Import:
use Errno qw(:POSIX);
-
Imports POSIX error constants from
error.h
-
Makes
%!
magic -
Example:
my $fh; if (not open($fh, 'test')) { my $message = 'unknown error'; if ($!{'ENOENT'}) { $message = 'no such file or directory'; } die $message . "n"; } close($fh);