Skip to content

Instantly share code, notes, and snippets.

@pwr22
Last active August 29, 2015 14:13
Show Gist options
  • Save pwr22/225f19412f406d315961 to your computer and use it in GitHub Desktop.
Save pwr22/225f19412f406d315961 to your computer and use it in GitHub Desktop.
TOD Greeter
#!/usr/bin/env perl
use Modern::Perl '2014';
my $hour = (localtime)[2];
my $TOD = do { if($hour < 12) { "morning"}
elsif($hour < 17) { "afternoon"}
else { "evening"}};
say $TOD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment