if ($substring=~/([0-9]{2})-([0-9]{2})-([0-9]{4})\s$/) { my $date="$1\.$2\.$3"; my $testdate="$1\.$2\.$3"." Perl Party"; if ($string=~/$testdate/ { print "There is a Perl Party on $date\n";} }}