Most modern languages have consoles.
The console is an interactive tool that evaluates your input while you type it.
It gives you several advantages:

Quickly test some thought or tricky expression

Run some code bigger than one line without a temporary file

Play around with libraries and modules

You can even call a console in your script and play around in script's context

For Ruby it would be irb,
for Python is...
python by itself and for perl...
and there was nothing for perl (except that ugly perl -d -e "" and several failed projects) until Devel::REPL was written by Matt S Trout (a.k.a.
mst) from ShadowCatSystems http://www.shadowcatsystems.co.uk.