in reply to howto capture a keystroke

Just for sake of TMTOWTDI, you can also have a look at the -1 / -one_char option of IO::Prompt. But it's probably only Term::ReadKey ;)

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.