morning 早晨叫床.pl

#!/usr/bin/perl
use warnings;
use strict;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst);
#注意$mon+1,$year+1900;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime();
my $result = substr("00".(($mon*30 + $mday)%101+2),-3).".rmvb";
print $result."\n";
if($hour==6 && $wday>=1 && $wday<=6){
    sleep(60);
    system("d:\\movies\\donghua\\".$result);
}


你可能感兴趣的:(perl)