in reply to output string editing

I'd start with Term::ReadLine.