in reply to QuickPerl: a step up from -e

Why not just

#!/usr/bin/perl package Run::Perl; print "Enter some perl: "; while ($_=<>) { chomp; exit unless $_; eval; print "\nEnter some perl: "; }

tachyon

s&&rsenoyhcatreve&&&s&n\w+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: QuickPerl: a step up from -e
by Abigail (Deacon) on Jul 05, 2001 at 02:06 UTC
    That would completely miss the point, wouldn't it? You cannot edit what you ran before (and as a minor thing, you can't use newlines)

    -- Abigail

Re: Re: QuickPerl: a step up from -e
by John M. Dlugosz (Monsignor) on Jul 05, 2001 at 02:14 UTC
    Because the idea is to be able to edit and retry, as well as edit before trying. Just entering a few lines like that even loses the ability of editing it via command history.

    Yours takes one line at a time and executes it. It fills a different need, I suppose: trying variations of a syntax construct, for example, without having to type the perl-e part over and over. I'm thinking of larger multi-line programs.

      Is there someting wrong with using one of the many Perl IDE's available for both *nix and Win 32? I use Perl Builder 2 for Win 32 and Linux. You can type in as many lines as you want, edit to your hearts content, run at the press of a button, read the error codes, check the output, check vars, set breakpoints, and never save the file if you don't want to. Add syntax colour coding, a curly bracket matcher, access to the manpages, pod viewers, etc, etc, etc You can get a fully featured trial version here

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n\w+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

        Thanks for the tip, tachyon. I'll check it out.

        Update: For $300, I'm not interested :(