#! /usr/bin/perl -w use strict; use Date::Calc qw/Days_in_Month/; while( ) { chomp; my( $year, $month ) = split; my $days = eval { Days_in_Month( $year, $month) }; $days = 'who knows?' if $@; print "$year/$month => $days\n"; } __DATA__ 1996 1 1996 2 1998 2 2000 2 1900 2 1600 2 2001 2 2001 7 2001 12 2001 13 2001 0