#!/usr/bin/perl use POSIX; use IO::File; use Term::ReadLine; my $term_prompt = Term::ReadLine->new( "perlsh" ); my $p_line = ""; while ( true ){ $p_line = $term_prompt->readline( "\e[95mperlsh>\e[0m " ); if ( $p_line eq "quit" or $p_line eq "q" ){ undef $p_line; exit( 0 ); } if ( defined($p_line) and length($p_line) > 0 ){ eval( $p_line ); $p_line = ""; } }