Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl: console / command-line tool for interactive code evaluation and testing

Python offers an interactive interpreter allowing the evaluation of little code snippets by submitting a couple of lines of code to the console. I was wondering if a tool with similar functionality (e.g. including a history accessible with the arrow keys) also exists for Perl?

There seem to be all kinds of solutions out there, but I can't seem to find any good recommendations. I.e. lots of tools are mentioned, but I'm interested in which tools people actually use and why. So, do you have any good recommendations, excluding the standard perl debugging (perl -d -e 1)?

Here are some interesting pages I've had a look at:

  • a question in the official Perl FAQ
  • another Stackoverflow question, where the answer mostly is the perl debugger and several links are broken
  • Perl Console
  • Perl Shell
like image 814
dlaehnemann Avatar asked May 29 '13 12:05

dlaehnemann


1 Answers

   perl -d -e 1

Is perfectly suitable, I've been using it for years and years. But if you just can't, then you can check out Devel::REPL

like image 178
Len Jaffe Avatar answered Sep 19 '22 12:09

Len Jaffe