perlsh(1p)


NAME

   perlsh - one-line perl evaluator with line editing function and
   variable name completion function

SYNOPSIS

     perlsh

DESCRIPTION

   This program reads input a line, and evaluates it by perl interpreter,
   and prints the result.  If the result is a list value then each value
   of the list is printed line by line.  This program can be used as a
   very strong calculator which has whole perl functions.

   This is a sample program Term::ReadLine::Gnu module.  When you input a
   line, the line editing function of GNU Readline Library is available.
   Perl symbol name completion function is also available.

   Before invoking, this program reads ~/.perlshrc and evaluates the
   content of the file.

   When this program is terminated, the content of the history buffer is
   saved in a file ~/.perlsh_history, and it is read at next invoking.

VARIABLES

   You can customize the behavior of "perlsh" by setting following
   variables in ~/.perlshrc;

   $PerlSh::PS1
       The primary prompt string.  The following backslash-escaped special
       characters can be used.

               \h: host name
               \u: user name
               \w: package name
               \!: history number

       The default value is `"\w[\!]$ "'.

   $PerlSh::PS2
       The secondary prompt string.  The default value is `"> "'.

   $PerlSh::HISTFILE
       The name of the file to which the command history is saved.  The
       default value is "~/.perlsh_history".

   $PerlSh::HISTSIZE
       If not "undef", this is the maximum number of commands to remember
       in the history.  The default value is 256.

   $PerlSh::STRICT
       If true, restrict unsafe constructs.  See "use strict" in perl man
       page.  The default value is 0;

FILES

   ~/.perlshrc
       This file is eval-ed at initialization.  If a subroutine
       "afterinit" is defined in this file, it will be eval-ed after
       initialization.  Here is a sample.

               # -*- mode: perl -*-
               # decimal to hexa
               sub h { map { sprintf("0x%x", $_ ) } @_;}

               sub tk {
                   $t->tkRunning(1);
                   use Tk;
                   $mw = MainWindow->new();
               }

               # for debugging Term::ReadLine::Gnu
               sub afterinit {
                   *t = \$PerlSh::term;
                   *a = \$PerlSh::attribs;
               }

   ~/.perlsh_history
   ~/.inputrc
       A initialization file for the GNU Readline Library.  Refer its
       manual for details.

SEE ALSO

   Term::ReadLine::Gnu <http://search.cpan.org/dist/Term-ReadLine-Gnu/>

   GNU Readline Library
   <http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html>

AUTHOR

   Hiroo Hayashi <hiroo.hayashi@computer.org>





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.