#!/usr/bin/perl use strict; use warnings; use Time::Piece; my $t = Time::Piece->new; my $month = $t->mon; my $year = $t->year; for my $days ($month) { my $dates = Time::Piece->strptime("$month/$days/$year" . '01', '%m%d%Y%')->wday); } #### 03/01/2014 03/02/2014 ... 03/31/2014