use Win32::Sound; until((localtime)[2] == $ARGV[1]){ sleep(1); } Win32::Sound::Play($ARGV[0]) foreach(0..4);