3

Languages like Ruby, Python, Lua, PHP, Node.js, etc. have a simple "shell" where you can type simple one-liners and see the result. Does Perl has something similar? I'm not looking for something fancy that does pretty printing (I'll use print()) or accepts multiline input.

The story is this:

I need to experiment with some regexps. I know I can do perl -e "..." but then I need to shell-escape the code and this complicates matters. If I had a Perl shell I wouldn't need to worry about escaping.

3
  • Ok, I see that the question is indeed answered there. Sorry.
    – Niccolo M.
    Dec 23, 2013 at 13:16
  • I usually find that using single quotes in -e is good enough for most purposes: perl -e 'print "my data here\n"'
    – user3458
    Dec 23, 2013 at 13:21
  • 1
    For the specific problem of interactively experimenting with regexps, try rxrx from Regexp::Debugger.
    – cjm
    Dec 23, 2013 at 16:10

2 Answers 2

2

Have you ever tried Reply.pm? I'm using it.

https://metacpan.org/release/Reply

1
  • Reply is very good. Devel::REPL is also good.
    – tobyink
    Dec 23, 2013 at 16:22
2

Have a try with this CPAN module:

Perl::Shell

Not the answer you're looking for? Browse other questions tagged or ask your own question.