my $time = localtime(); if ($time =~ /^Tue/i) { if ($time =~ /2005$/) { print "It's some Tuesday in 2005\n"; } }