good_practice.p6

#!/usr/local/bin/pugs

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

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

say "$greeting World!  (The time is { sprintf("%02u:%02u",
                                              $hour, $min) })";