in reply to making something happen in real time
you could select more frequently and have it check for $t intervals to play the tone, that way your script would be the cpu hog and demand more attention from the system.
In Section
Seekers of Perl Wisdom