{
    "mode": "perldoc",
    "parameter": "Errno",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Errno/json",
    "generated": "2026-06-13T21:40:51Z",
    "synopsis": "use Errno qw(EINTR EIO :POSIX);",
    "sections": {
        "NAME": {
            "content": "Errno - System errno constants\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Errno qw(EINTR EIO :POSIX);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"Errno\" defines and conditionally exports all the error constants defined in your system errno.h\ninclude file. It has a single export tag, \":POSIX\", which will export all POSIX defined error\nnumbers.\n\nOn Windows, \"Errno\" also defines and conditionally exports all the Winsock error constants\ndefined in your system WinError.h include file. These are included in a second export tag,\n\":WINSOCK\".\n\n\"Errno\" also makes \"%!\" magic such that each element of \"%!\" has a non-zero value only if $! is\nset to that value. For example:\n\nmy $fh;\nunless (open($fh, \"<\", \"/fangorn/spouse\")) {\nif ($!{ENOENT}) {\nwarn \"Get a wife!\\n\";\n} else {\nwarn \"This path is barred: $!\";\n}\n}\n\nIf a specified constant \"EFOO\" does not exist on the system, $!{EFOO} returns \"\". You may use\n\"exists $!{EFOO}\" to check whether the constant is available on the system.\n\nPerl automatically loads \"Errno\" the first time you use \"%!\", so you don't need an explicit\n\"use\".\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "Importing a particular constant may not be very portable, because the import will fail on\nplatforms that do not have that constant. A more portable way to set $! to a valid value is to\nuse:\n\nif (exists &Errno::EFOO) {\n$! = &Errno::EFOO;\n}\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Graham Barr <gbarr@pobox.com>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (c) 1997-8 Graham Barr. All rights reserved. This program is free software; you can\nredistribute it and/or modify it under the same terms as Perl itself.\n",
            "subsections": []
        }
    },
    "summary": "Errno - System errno constants",
    "flags": [],
    "examples": [],
    "see_also": []
}