in reply to how can i find number of days in a given year and month

I've grown fond of Date::Simple.

use Date::Simple qw(days_in_month); my $days = days_in_month( 2004, 2 );