Created
December 13, 2009 21:11
-
-
Save willwillis/255601 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Date::Calc qw/:all/; | |
# | |
# posting some more scripts | |
# from back in the day | |
# | |
# | |
my %days_till = ( | |
Graduation => Delta_Days( Today(), 2007, 12, 16 ), | |
MyLastFinal => Delta_Days( Today(), 2007, 12, 8 ), | |
Christmas => Delta_Days( Today(), 2007, 12, 25 ), | |
ThanksGiving => Delta_Days( Today(), 2007, 11, 22 ), | |
MyVacation => Delta_Days( Today(), 2007, 12, 10 ), | |
); | |
print "\nDays till...\n"; | |
map { printf( "\n%20s:%3d", $_, $days_till{$_} ) } | |
sort { $days_till{$a} <=> $days_till{$b} } keys %days_till; | |
print "\n\n"; | |
__END__ | |
Days till... | |
ThanksGiving:-752 | |
MyLastFinal:-736 | |
MyVacation:-734 | |
Graduation:-728 | |
Christmas:-719 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment