You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
604 B
Perl

#! /usr/local/bin/perl
($second, $minute, $hour, $day_of_month,$month, $year, $weekday, $day_of_year, $daylight_standard_time) = localtime(time);
SWITCH:{
if ($hour > 18){
if ($hour < 21){
print "Good Evening World\n";
}else {
print "Good Night World\n";
}
last SWITCH ;
}
if ($hour > 12){
print "Good Afternoon World\n";
last SWITCH ;
}
if ($hour > 6) {
print "Good Morning World\n";
last SWITCH ;
}
DEFAULT:{
print "Go to BED already! \n";
last SWITCH ;
}
}