in reply to windows linux and perl

I think Term::ReadLine will give you history and line editing capabilities, but I haven't used it myself.