if ($_ = m%$dm%) { #stuff } #### my $dm = quotemeta($date);