#!/usr/bin/perl # use Date::Calc qw( Today Nth_Weekday_of_Month_Year ); ($year,$month,$day) = Today(); $dow = 2; # 5 = tuesday $n = 3; # 1 = Third of that day of week $thirdtuesday = Nth_Weekday_of_Month_Year($year,$month,$dow,$n); #print "$thirdtuesday\n"; if ($thirdtuesday == $day) { # Do something! print "Today is the Third Tuesday !\n"; }