CPAN Terminal> l Term::ReadLine .. Version Installed 1.14 Version on CPAN 1.14 CPAN Terminal> l Term::ReadLine::Perl .. Version Installed 1.0303 Version on CPAN 1.0303 #anyway using Term::ReadLine::Perl directly cause some error: io@COMP:C>perl -MTerm::ReadLine::Perl -e 0 Can't locate object method "Features" via package "Term::ReadLine::Stub" at C:/ulisse/strawberry/perl/lib/Term/ReadLine Perl.pm line 101. Compilation failed in require. BEGIN failed--compilation aborted. #### #!perl use strict; use warnings; use Term::ReadLine; BEGIN{$ENV{PERL_RL}="Perl"} print "\$ENV{PERL_RL} $ENV{PERL_RL}\n"; $ENV{TERM}=undef; my $term = Term::ReadLine->new('xxx'); print $term->ReadLine; my %cmds = (a=>1,b=>2); # THIS WORKS &readline::rl_basic_commands(keys %cmds); # THE FOLLOWING CHECK DOES NOT WORK if (exists &readline::rl_basic_commands){print "BEFORE WHILE EXISTS\n"; &readline::rl_basic_commands(keys %cmds);} while ( defined ( $_ = $term->readline( '>') ) ) { print "$_\n"; } continue{ # THIS CHECK WORKS INDEED! if (exists &readline::rl_basic_commands){print "IN CONTINUE EXISTS\n"; &readline::rl_basic_commands(keys %cmds);} } ###OUTPUT $ENV{PERL_RL} Perl > ###if you press TAB the current dir content is dumped: this is the default behaviour if ###you does not provide autocompletion list ###but after, if you press ENTER: > Term::ReadLine::Perl IN CONTINUE EXISTS > a b >