From 111cc0e78e8201e6118ca8ebee226a7cf3d34462 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 14 May 2009 22:23:13 -0500 Subject: solution for 19 --- 019.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 019.pl (limited to '019.pl') diff --git a/019.pl b/019.pl new file mode 100755 index 0000000..b0d1cb6 --- /dev/null +++ b/019.pl @@ -0,0 +1,12 @@ +#!/usr/bin/perl +use strict; +use warnings; +use DateTime; + +my $day = DateTime->new(year => 1901, month => 1, day => 1); +my $count = 0; +while ($day->year < 2001) { + $count++ if $day->day_of_week == 7 && $day->day_of_month == 1; + $day->add(days => 1); +} +print "$count\n"; -- cgit v1.2.3