in reply to Text buffer thingy

Have a look at the Term::Readline module