#!/usr/bin/perl use strict; use warnings; use Date::Calc qw( Add_Delta_Days Monday_of_Week Week_of_Year ); use Data::Dumper; my @start = (1,1,2007); my @end = (14,4,2009); my ($year,$month,$day) = Add_Delta_Days( Monday_of_Week( Week_of_Year( reverse @start ) ), 4 ); print Dumper $year,$month,$day; my @fridays; while( sprintf("%04d%02d%02d",$year,$month,$day) < sprintf("%04d%02d%02d",reverse @end) ){ push @fridays, sprintf "%02d.%02d.%04d", $day,$month,$year; ($year,$month,$day) = Add_Delta_Days( $year,$month,$day, 7 ); } print $_,"\n" for @fridays;