#!/usr/bin/perl -w use strict; use Win32::Console; my $con = Win32::Console->new(); $con->Display; $con->Write("Sleep how many seconds? "); chomp(my $sleep = ); $con->Free(); # detache our script from the console which closes # now let's fork of an alarm clock child defined ( my $pid = fork() ) or die "Can't fork $!\n"; if ($pid) { exit; } else { sleep $sleep; $con->Alloc() or die $!; $con->Write("BZZT - this is your wake up call"); sleep 5; exit; }