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.
11 lines
251 B
Perl
11 lines
251 B
Perl
5 years ago
|
$hour=(localtime)[2];
|
||
|
if ($hour >= 0 && $hour < 12){
|
||
|
print "Good-morning!\n";
|
||
|
}elsif ($hour == 12){
|
||
|
print "Lunch time.\n";
|
||
|
}elsif ($hour > 12 && $hour < 17) {
|
||
|
print "Siesta time.\n";
|
||
|
}
|
||
|
else {
|
||
|
print "Goodnight. Sweet dreams.\n";
|
||
|
}
|