use DateTime; for my $mon (8, 9, 10) { if (DateTime->new(year => 2014, month => 10, day => 28)->day_abbr() eq 'Thu') { print "Hit: $mon\n"; } }