Re: Introducing Interactive Perl

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Fri, 24 Oct 2008 04:04:05 -0400 (EDT)

Yes, you could use it for one liners.

> 1 + 2
3

It remembers previous commands, so you can do more than one liners.

> $x = 3
3
> $y = 4
4
> $x * $y
12

Since many popular modules are packaged in the executable, the code can
make use of them for more sophisticated, multiline operations with
variable assignments along the way to a result.

For someone learning Perl, this can be a friendly environment for
testing syntax.

The idea is intended to be the same as for other dynamic languages, e.g.,
Python and Ruby, where such an interactive environment is a useful part
of the overall development toolkit.

Jamal

On Fri,
24 Oct 2008, Octavian Rasnita
wrote:

> Date: Fri, 24 Oct 2008 05:16:48 +0300
> From: Octavian Rasnita <orasnita@xxxxxxxxx>
> Reply-To: programmingblind@xxxxxxxxxxxxx
> To: programmingblind@xxxxxxxxxxxxx
> Subject: Re: Introducing Interactive Perl
>
> I am programming in perl for many years, but I still don't know what could I
> use an Interactive perl for. Can you give me some examples?
>
> Is it just another way of using a one-liner like the following?
>
> perl -e "print 1+2"
>
> Or it can be used for more complex things?
>
> Thanks.
>
> Octavian
>
> ----- Original Message -----
> From: "Jamal Mazrui" <empower@xxxxxxxxx>
> To: <ProgrammingBlind@xxxxxxxxxxxxx>
> Sent: Friday, October 24, 2008 12:42 AM
> Subject: Introducing Interactive Perl
>
>
> > I've been doing some Perl programming lately, and wished there was an
> > interactive environment like Python or Ruby.  There probably is one or
> > more by a 3rd party, but I have not found one in the ActiveState
> > distribution of Perl for Windows.  Since I had developed an Interactive
> > JScript environment using the .NET Framework, I thought I would try to
> > port the same ideas to a project with Perl and the native Win32 API.  Here
> > is my initial attempt.
> >
> > Jamal
> >
> >
> >
> > Now available at
> > http://EmpowermentZone.com/ipl.zip
> >
> > Interactive Perl
> > Version 1.0
> > October 23, 2008
> > Copyright 2008 by Jamal Mazrui
> > LGPL license
> >
> > Interactive Perl (IPL) is a console mode environment for testing and
> > evaluating code in the Perl language.  Run ipl.exe to start a session.
> > The file html.zip contains documentation on the modules bundled in the
> > executable.  Of course, there are other ways of finding relevant
> > documentation and examples.
> >
> > I invite Perl programmers to contribute to this project.  Below is the
> > online help of this initial version:
> >
> > Type a Perl statement or expression, followed by Enter.
> > A trailing semicolon (;) is not needed, but it may be used to seperate
> > multiple
> > statements on the same line.
> > Many modules are packaged in the executable,
> > so a 'use' statement is not needed:
> > Date::Calc, English, File::Basename, File::Slurp,
> > HTML::HeadParser, HTML::LinkExtor, HTML::Parser, HTML::Tagset,
> > HTML::TokeParser,
> > List::Util, LWP, LWP::Simple, LWP::UserAgent,
> > Scalar::Util, String::Util, Term::Screen::Win32, Text::Autoformat,
> > Text::Reform,
> > URI,
> > Win32, Win32::ActAcc, Win32::API, Win32::Clipboard, Win32::Console,
> > Win32::Exe,
> > Win32::FetchCommand, Win32::File, Win32::FileOp, Win32::FileTime,
> > Win32::GUI, Win32::GuiTest, Win32::Job, Win32::OLE, Win32::OLE::Const,
> > Win32::OL
> > E::Variant, Win32::Process, Win32::Service.
> > In addition, some built-in commands are available.
> > A command name is lower case, with a space before each argument,
> > and no quotes around it.
> > exit or quit = end this program
> > cls = clear the screen
> > eval FileName = execute a Perl script file
> > log FileName = log this session to a file
> > log off = stop logging
> > help = display this documentation
> >
> > __________
> > View the list's information and change your settings at
> > //www.freelists.org/list/programmingblind
> >
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: