Replace your long sleeps with
my $sleep = time() + 5; sleep 1 while !$quit and time() < $sleep;
That will reduce your delay to a max 2 seconds.
If you still need a more immediate response, you could use select undef, undef, undef, 0.1
Caveat: Only tested under win32.
In reply to Re: Dormus interruptus
by BrowserUk
in thread Dormus interruptus
by pbeckingham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |