#!/usr/bin/pugs
my $list = eval_perl5 "[localtime()]";
my ($sec,$min,$hour,$day,$mon,$year) = (0..6).map:{$list[$_]};
my $greeting = {
given $hour {
when $hour < 12 { "Good morning" }
when $hour < 17 { "Good afternoon" }
default { "Good afternoon" }
}
};
say "$greeting World! (The time is { sprintf("%02u:%02u",
$hour, $min) })";