in reply to Terminal. Update text while user types.

You could try Term::Complete

#!/usr/bin/perl use Term::Complete; print "Type ap, then hit the <tab> key or <ctrl-d>\n"; my $foo=Complete('>',('application','apple','applicant')); print "You typed [$foo]\n";
You may need to play around with configuration to meet your requirements, but it's fairly easy to use.