good_greeting.p6

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

given $hour {
   when $hour < 12 {
      $greeting = "Good morning";
   }
   when $hour < 17 {
      $greeting = "Good afternoon";
   }
   default {
      $greeting = "Good evening";
   }
}

say "$greeting World!  (The time is $hr:$min)";