use POSIX qw(mktime); # required for mktime function
# $mon is the month number (0-11)
# $ynum is year - 1900 (for 2004 enter 104)
$mday=1; # 1st
$mon=7; # August
$ynum=104; # 2004
$tstamp = mktime (0,0,0,$mday,$mon,$ynum);
$projected_time = localtime ($tstamp);
$month_day=substr $projected_time,0,3;
++$mday if $month_day eq "Sun";
$mday+=2 if $month_day eq "Sat";
$month_day eq "Mon" if $mday > 1;
print "\nFirst business day is ",$month_day," and is on day ",$mday," of month";