My alarm clock ran out of batteries just now, so I wrote this to get me up at 7 tomorrow morning.
use Win32::Sound; until((localtime)[2] == $ARGV[1]){ sleep(1); } Win32 +::Sound::Play($ARGV[0]) foreach(0..4);
Just specify a file to play, and the hour when you want to get up.
Yup, no minutes. What did you expect, a custom wake up call? :)
John J Reiser
newrisedesigns.com
Back to
Cool Uses for Perl