{
    "mode": "man",
    "parameter": "perlsh",
    "section": "1p",
    "url": "https://www.chedong.com/phpMan.php/man/perlsh/1p/json",
    "generated": "2026-06-14T00:17:48Z",
    "synopsis": "perlsh",
    "sections": {
        "NAME": {
            "content": "perlsh - one-line perl evaluator with line editing function and       variable name\ncompletion function\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "perlsh\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program reads input a line, and evaluates it by perl interpreter, and prints the result.\nIf the result is a list value then each value of the list is printed line by line.  This\nprogram can be used as a very strong calculator which has whole perl functions.\n\nThis is a sample program Term::ReadLine::Gnu module.  When you input a line, the line editing\nfunction of GNU Readline Library is available.  Perl symbol name completion function is also\navailable.\n\nBefore invoking, this program reads ~/.perlshrc and evaluates the content of the file.\n\nWhen this program is terminated, the content of the history buffer is saved in a file\n~/.perlshhistory, and it is read at next invoking.\n",
            "subsections": []
        },
        "VARIABLES": {
            "content": "You can customize the behavior of \"perlsh\" by setting following variables in ~/.perlshrc;\n\n$PerlSh::PS1\nThe primary prompt string.  The following backslash-escaped special characters can be\nused.\n\n\\h: host name\n\\u: user name\n\\w: package name\n\\!: history number\n\nThe default value is `\"\\w[\\!]$ \"'.\n\n$PerlSh::PS2\nThe secondary prompt string.  The default value is `\"> \"'.\n\n$PerlSh::HISTFILE\nThe name of the file to which the command history is saved.  The default value is\n\"~/.perlshhistory\".\n\n$PerlSh::HISTSIZE\nIf not \"undef\", this is the maximum number of commands to remember in the history.  The\ndefault value is 256.\n\n$PerlSh::STRICT\nIf true, restrict unsafe constructs.  See \"use strict\" in perl man page.  The default\nvalue is 0;\n",
            "subsections": []
        },
        "FILES": {
            "content": "~/.perlshrc\nThis file is eval-ed at initialization.  If a subroutine \"afterinit\" is defined in this\nfile, it will be eval-ed after initialization.  Here is a sample.\n\n# -*- mode: perl -*-\n# decimal to hexa\nsub h { map { sprintf(\"0x%x\", $ ) } @;}\n\nsub tk {\n$t->tkRunning(1);\nuse Tk;\n$mw = MainWindow->new();\n}\n\n# for debugging Term::ReadLine::Gnu\nsub afterinit {\n*t = \\$PerlSh::term;\n*a = \\$PerlSh::attribs;\n}\n\n~/.perlshhistory\n~/.inputrc\nA initialization file for the GNU Readline Library.  Refer its manual for details.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Term::ReadLine::Gnu <http://search.cpan.org/dist/Term-ReadLine-Gnu/>\n\nGNU Readline Library <https://tiswww.cwru.edu/php/chet/readline/rltop.html>\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Hiroo Hayashi <hiroo.hayashi@computer.org>\n\n\n\nperl v5.34.0                                 2022-02-06                                   PERLSH(1p)",
            "subsections": []
        }
    },
    "summary": "perlsh - one-line perl evaluator with line editing function and       variable name completion function",
    "flags": [],
    "examples": [],
    "see_also": []
}