good_greeting.pl

($sec,$min,$hour,$day,$mon,$year) = localtime();

if($hour < 12) {
    $greeting = "Good morning";
}
elsif($hour < 17) {
    $greeting = "Good afternoon";
}
else {
    $greeting = "Good evening";
}

print "$greeting World!  (The time is $hr:$min)\n";