{
    "mode": "man",
    "parameter": "errno",
    "section": "3",
    "url": "https://www.chedong.com/phpMan.php/man/errno/3/json",
    "generated": "2026-06-03T00:20:25Z",
    "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\nerrno.h include file. It has a single export tag, \":POSIX\", which will export all POSIX\ndefined error numbers.\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 $!\nis set 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\nuse \"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\nto use:\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\ncan redistribute it and/or modify it under the same terms as Perl itself.\n\n\n\nperl v5.34.0                                 2025-07-25                                 Errno(3perl)",
            "subsections": []
        }
    },
    "summary": "Errno - System errno constants",
    "flags": [],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Look up errno names and descriptions.",
        "examples": [
            {
                "description": "Lookup errno description by name or code",
                "command": "errno {{name|code}}"
            },
            {
                "description": "List all errno names, codes, and descriptions",
                "command": "errno {{-l|--list}}"
            },
            {
                "description": "Search for code whose description contains all of the given text",
                "command": "errno {{-s|--search}} {{text}}"
            },
            {
                "description": "Search for code whose description contains all of the given text (all locales)",
                "command": "errno {{-S|--search-all-locales}} {{text}}"
            }
        ]
    }
}