use Term::ReadKey; ReadMode 'cbreak'; # makes each char available as it is typed $key = ReadKey(0); # get the single char # I guess here is where you'd want to print the comma # ReadMode 'normal'; # return mode back to normal