Question - How can I use Perl interactively?
Answer -
The typical approach uses the Perl debugger, described in the perldebug(1) manpage, on an "empty" program, like this:
perl -de 42
Now just 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, set breakpoints, and other operations typically found in symbolic debuggers.