in reply to stdin problem

One idea is Term::ReadKey. "perldoc -q keyboard" might give some others.