in reply to select?

For those that don't have any silly "no modules" restrictions, this problem could be solved by using the Term::ReadKey module. For those that insist on re-inventing the wheel, reading the code in this module will probably help you along your way. Remember that even though you may (for whatever reason) not be able to use a module with your project, that doesn't prevent you from downloading it and reading through the code to see how they do it.

The short answer: check out the documentation for getc, which is Perl's implementation of the standard C function by the same name. Update: I highly recommend going with the FAQ links mentioned above, as there are some caveats with using getc on terminals.

If you need to be monitoring several input streams at once for data, and thus need to use select, that is a very weighty topic. See the documentation for IO::Select.. There are probably other tutorials floating around, but I doubt you're going to get a thorough lesson on select here. Good luck.