in reply to Milliseconds
use Curses; ... napms(10);
Depending on your system resolution, this may or may not wait ten seconds, in which case, it will round up to the next time resolution allowed. For modern systems, it's most likely that this will work well.
Unfortunately, if you wish to interrupt a command after 10 ms, this is nearly impossible without threads (which Perl doesn't manage reliably) and alarm has second resolution only. For reading in from file descriptors, look in select (the non-Perl C-ish version which allows you to wait a specified amount of time for incoming data.)
|
|---|