{
    "content": [
        {
            "type": "text",
            "text": "# Symbol (man)\n\n## NAME\n\nSymbol - manipulate Perl symbols and their names\n\n## SYNOPSIS\n\nuse Symbol;\n$sym = gensym;\nopen($sym, '<', \"filename\");\n$ = <$sym>;\n# etc.\nungensym $sym;      # no effect\n# replace *FOO{IO} handle but not $FOO, %FOO, etc.\n*FOO = geniosym;\nprint qualify(\"x\"), \"\\n\";              # \"main::x\"\nprint qualify(\"x\", \"FOO\"), \"\\n\";       # \"FOO::x\"\nprint qualify(\"BAR::x\"), \"\\n\";         # \"BAR::x\"\nprint qualify(\"BAR::x\", \"FOO\"), \"\\n\";  # \"BAR::x\"\nprint qualify(\"STDOUT\", \"FOO\"), \"\\n\";  # \"main::STDOUT\" (global)\nprint qualify(\\*x), \"\\n\";              # returns \\*x\nprint qualify(\\*x, \"FOO\"), \"\\n\";       # returns \\*x\nuse strict refs;\nprint { qualifytoref $fh } \"foo!\\n\";\n$ref = qualifytoref $name, $pkg;\nuse Symbol qw(deletepackage);\ndeletepackage('Foo::Bar');\nprint \"deleted\\n\" unless exists $Foo::{'Bar::'};\n\n## DESCRIPTION\n\n\"Symbol::gensym\" creates an anonymous glob and returns a reference to it.  Such a glob\nreference can be used as a file or directory handle.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **BUGS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Symbol",
        "section": "",
        "mode": "man",
        "summary": "Symbol - manipulate Perl symbols and their names",
        "synopsis": "use Symbol;\n$sym = gensym;\nopen($sym, '<', \"filename\");\n$ = <$sym>;\n# etc.\nungensym $sym;      # no effect\n# replace *FOO{IO} handle but not $FOO, %FOO, etc.\n*FOO = geniosym;\nprint qualify(\"x\"), \"\\n\";              # \"main::x\"\nprint qualify(\"x\", \"FOO\"), \"\\n\";       # \"FOO::x\"\nprint qualify(\"BAR::x\"), \"\\n\";         # \"BAR::x\"\nprint qualify(\"BAR::x\", \"FOO\"), \"\\n\";  # \"BAR::x\"\nprint qualify(\"STDOUT\", \"FOO\"), \"\\n\";  # \"main::STDOUT\" (global)\nprint qualify(\\*x), \"\\n\";              # returns \\*x\nprint qualify(\\*x, \"FOO\"), \"\\n\";       # returns \\*x\nuse strict refs;\nprint { qualifytoref $fh } \"foo!\\n\";\n$ref = qualifytoref $name, $pkg;\nuse Symbol qw(deletepackage);\ndeletepackage('Foo::Bar');\nprint \"deleted\\n\" unless exists $Foo::{'Bar::'};",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 28,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Symbol - manipulate Perl symbols and their names\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Symbol;\n\n$sym = gensym;\nopen($sym, '<', \"filename\");\n$ = <$sym>;\n# etc.\n\nungensym $sym;      # no effect\n\n# replace *FOO{IO} handle but not $FOO, %FOO, etc.\n*FOO = geniosym;\n\nprint qualify(\"x\"), \"\\n\";              # \"main::x\"\nprint qualify(\"x\", \"FOO\"), \"\\n\";       # \"FOO::x\"\nprint qualify(\"BAR::x\"), \"\\n\";         # \"BAR::x\"\nprint qualify(\"BAR::x\", \"FOO\"), \"\\n\";  # \"BAR::x\"\nprint qualify(\"STDOUT\", \"FOO\"), \"\\n\";  # \"main::STDOUT\" (global)\nprint qualify(\\*x), \"\\n\";              # returns \\*x\nprint qualify(\\*x, \"FOO\"), \"\\n\";       # returns \\*x\n\nuse strict refs;\nprint { qualifytoref $fh } \"foo!\\n\";\n$ref = qualifytoref $name, $pkg;\n\nuse Symbol qw(deletepackage);\ndeletepackage('Foo::Bar');\nprint \"deleted\\n\" unless exists $Foo::{'Bar::'};\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Symbol::gensym\" creates an anonymous glob and returns a reference to it.  Such a glob\nreference can be used as a file or directory handle.\n\nFor backward compatibility with older implementations that didn't support anonymous globs,\n\"Symbol::ungensym\" is also provided.  But it doesn't do anything.\n\n\"Symbol::geniosym\" creates an anonymous IO handle.  This can be assigned into an existing\nglob without affecting the non-IO portions of the glob.\n\n\"Symbol::qualify\" turns unqualified symbol names into qualified variable names (e.g. \"myvar\"\n-> \"MyPackage::myvar\").  If it is given a second parameter, \"qualify\" uses it as the default\npackage; otherwise, it uses the package of its caller.  Regardless, global variable names\n(e.g. \"STDOUT\", \"ENV\", \"SIG\") are always qualified with \"main::\".\n\nQualification applies only to symbol names (strings).  References are left unchanged under\nthe assumption that they are glob references, which are qualified by their nature.\n\n\"Symbol::qualifytoref\" is just like \"Symbol::qualify\" except that it returns a glob ref\nrather than a symbol name, so you can use the result even if \"use strict 'refs'\" is in\neffect.\n\n\"Symbol::deletepackage\" wipes out a whole package namespace.  Note this routine is not\nexported by default--you may want to import it explicitly.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "\"Symbol::deletepackage\" is a bit too powerful. It undefines every symbol that lives in the\nspecified package. Since perl, for performance reasons, does not perform a symbol table\nlookup each time a function is called or a global variable is accessed, some code that has\nalready been loaded and that makes use of symbols in package \"Foo\" may stop working after you\ndelete \"Foo\", even if you reload the \"Foo\" module afterwards.\n\n\n\nperl v5.34.0                                 2025-07-25                                Symbol(3perl)",
                "subsections": []
            }
        }
    }
}