#!/usr/bin/perl -w use strict; use Date::Handler; my $start_year = 2004; my $start_month = 9; my $start_day = 1; my $end_year = 2006; my $end_month = 9; my $end_day = 1; my $date; my ($week_day, $year, $month, $day, $max_month, $max_day, $min_month); my @work_days = (); for $year ($start_year .. $end_year){        if ( ($year eq $start_year) ){                $min_month = $start_month;        } else {                $min_month = 1;        }        if ( ($year eq $end_year) ){                $max_month = $end_month;        } else {                $max_month = 12;        }        for $month ($min_month .. $max_month){                $date = new Date::Handler({ date => { year => $year, month => $month, day => 0 },});                if ( ($year eq $end_year) && ($month eq $end_month) ){                        $max_day = $end_day;                } else {                        $max_day = $date->DaysInMonth();                } for $day ($start_day .. $max_day){                        $date = new Date::Handler({ date => { year => $start_year, month => $month, day => $day },});                        $week_day = $date->WeekDayName();                        push(@work_days, $week_day.';;'.$day.';;'.$month.';;'.$year) unless ( ($week_day eq 'Saturday') || ($week_day eq 'Sunday') );                }        } } my @dump= (); foreach my $work_day (@work_days) {         @dump = split(';;', $work_day);        print "$dump[0]\t$dump[1].$dump[2].$dump[3]\n"; }