use strict; use Term::ReadLine; my $term = Term::ReadLine->new('a'); # use vi-mode $term->parse_and_bind("set editing-mode vi"); print "you entered: " . $term->readline("Enter something: ");