How can I start an interactive console for Perl, similar to the irb
command for Ruby or python
for Python?
Also look for ptkdb on CPAN: http://search.cpan.org/search?query=ptkdb&mode=all
Sepia and PDE have also own REPLs (for GNU Emacs).
Matt Trout's overview lists five choices, from perl -de 0
onwards, and he recommends Reply, if extensibility via plugins is important, or tinyrepl
from Eval::WithLexicals, for a minimal, pure-perl solution that includes readline support and lexical persistence.
Read-eval-print loop:
$ perl -e'while(<>){print eval,"\n"}'
I think you're asking about a REPL (Read, Evaluate, Print, Loop) interface to perl. There are a few ways to do this: