- 论坛徽章:
- 0
|
手机置于桌,同置于桌有瓶水加冰,农夫山泉也。翌日早起,冰化水,水浸手机。不能通话事小,早起迟到事大。于是只得上网寻一在线闹钟,电脑彻夜不灭,方得安寝。天无绝人之路?非也。翌翌日,网络逾期欠费,在线闹钟亦不能用。余傍床深思:吾生于八七,存世已有二十四年,今在京城无一瓦寸地,蚁居于清河一幽闭处,早起如鸡早,蜂拥挤公交,晚归至街静,心烦不能眠。然虽悲苦如此,天亦不怜。思绪至此,凄凉之至,转念间坐起而奋,写下此二十五行代码,而后安心入眠,鼾声如雷,梦里依稀有笑容。
#Perl!
use warnings;
use strict;
my $set_up = "07:40";
my @set_up = split ":" , $set_up;
$set_up = $set_up[0] * 60 + $set_up[1];
while(1){
sleep 5;
my $current_time = localtime(time);
print $current_time , "\n";
my @TimeArray = split " " , $current_time;
my $H_M = $TimeArray[3];
my @H_M = split ":" , $H_M;
$H_M = $H_M[0] * 60 + $H_M[1];
my $distance = $H_M - $set_up;
if (($distance > -5) && ($distance < 5)){
last if $distance >= 0;
}
}
print "\n\nGet up , young guy ,It's time to get up !\n";
for(1..3){
system '"C:\Program Files\Windows Media Player\wmplayer.exe" "F:\\KuGou\\千百惠 - 当我想你的时候.mp3"';
sleep 180
} |
|