Interesting. Didn't know you could do that. Thanks.
A quick comparison of Perl, Python, and shell interactive modes:
- Perl -- You type in the whole script, line by line, and you get the output only after all lines have been entered and after you've typed __END__ as the last line. A syntax error will dump you back to the command line.
- shell -- you always get the output (if there is any) right after each line/command. View $? to see the return value of the last command that was run.
- Python -- You get the output of statements as you run them, just like the shell. Also, it automatically prints out the value of the expression evaluated on the line you just typed.
IMO, the Python shell is pretty darn interactive. The Perl shell might be nice for one-liners that take up more than one line ;), but it doesn't seem all that interactive to me.