in reply to Interactive Perl Interpreter

If it is really perl code being entered, then the bare bones are easy enough, e.g.:
use strict; use warnings; do { print ">>> "; my $cmd = <>; my $status = eval $cmd; $status or Syntax($cmd); } while 1; sub Syntax { print STDERR "Error parsing $_[0]"; }
The above needs some improvement, for example, eval is not as powerful as perl -e. A bigger challenge by far for a serious 'perl shell' would be to provide the advanced features, e.g. inline editing, history recall/substitution etc., that are available for e.g. ksh, so that the fledgling perl shell competes well enough with established shells.

Update In case anyone wonders, the loop exits when the user enters 'exit', because eval 'exit' does indeed exit the interpreting program.

-M

Free your mind