just for debug purposes, you could try system('stty -noecho'); or on other UN*X- system('ssty -echo'); or some variant thereof and still use normal input and see if your problem still pops up. Or for a heavy duty program- convert to use Curses; (it's fun and entertaining and looks nice with colors!- not really necessary for this script but it's an option...)