Look up the Perl debugger.

Ahh.. no... it hurts my eyes!!!

But seriously, a debugger is so not a REPL. Take this perl debugger session for example:

DB<1> my @foo = 1 .. 10; DB<2> print join ", " => @foo;
I get no response when I create a variable. Then when I try to use it, nothing happens. Is it not in scope anymore? Did an error occur? What is going on? How can I test my code snippets if I get no feedback?

Yes, yes, I know, with some arcane commands and such I can get the debugger to do those thing, but why should I have too? Just consider REPLs in other languages:

Here is Ocaml:

# let foo = [ 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; ];; val foo : int list = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10] # List.iter (fun x -> print_int x) foo;; 12345678910- : unit = ()
Here is Ruby:
irb(main):001:0> foo = 1 .. 10 => 1..10 irb(main):002:0> foo.each {|x| print x } 12345678910=> 1..10
My python/LISP/Haskell skills are way to rusty this early in the morning (before coffee too!) to write a working example, but I think I have made my point. Why should I have to work (and remember a series of arcane commands) to get what other languages give me for free?

-stvn

In reply to Re^2: RFC: IPerl - Interactive Perl ( read-eval-print loop ) by stvn
in thread RFC: IPerl - Interactive Perl ( read-eval-print loop ) by mseabrook

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.