use Date::Day; my $date = '10/15/2008'; #Today not Friday #my $date = '03/10/2006'; # Today Friday my ($month, $day, $year) = split(m{/}, $date); my $result = &day($month,$day,$year); #find the day of the given date ($result =~ /fri/i) ? print "Today Friday" : print "Sorry, Today not Friday";