Perl FAQ 3.1: How can I use Perl interactively?

Perl FAQ 3.1

How can I use Perl interactively?

The easiest way to do this is to run Perl under its debugger. If you have no program to debug, you can invoke the debugger on an `empty' program like this:

perl -de 0

(The more positive hackers prefer perl -de 1. :-)

Now you can type in any legal Perl code, and it will be immediately evaluated. You can also examine the symbol table, get stack backtraces, check variable values, and if you want to, set breakpoints and do the other things you can do in a symbolic debugger.


Other resources at this site: