in reply to Autocomplete in perl console application
I've never used it, but I found Term::Complete on CPAN. That sounds like it does what you want.