use Date::Calc qw( Today Nth_Weekday_of_Month_Year ); my ($year,$month,$day) = Today(); for my $m (1 .. 12) { printf("%d-%02d-%02d\n", Nth_Weekday_of_Month_Year($year,$m,1, 2)); }