in reply to Using Alarm to Handle Timing

Your code will break, eventually. Probably the only way to do this is by polling, not interrupting.

-- Randal L. Schwartz, Perl hacker