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.
from: http://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q3.1.html