in reply to How to restrict the user to enter only 1 character

A function you may want to check out is getc() which reads in the next character from the given filehandle, or STDIN if that isn't specified -
my $char = getc(); print "you entered $char\n";
Admittedly this doesn't deliver you a single character at a time, but the docs explain how you can go about achieving that.
HTH

broquaint