http://www.perlmonks.org?node_id=243580


in reply to A step on the path to enlightenment

perl -p -e "$_=eval"
but then you don't get new lines after each answer

You could use -l to tack on the newlines:

perl -lpe "$_=eval"