use Term::ReadLine; $ENV{TERM} = ''; my $term = Term::ReadLine->new('Tab Completion'); my $prompt = ">>> "; &readline::rl_basic_commands( qw(set quit type test run exit) ); while ( defined ( $_ = $term->readline($prompt) ) ) { exit if /exit/ or /quit/; print $_, "\n"; }