my $restore=`stty --save` or die; system("stty -icanon -echo") and die; read(STDIN, my $char, 1) or die $!; system("stty $restore") and die; print "thanks for pressing $char\n";