$filepath="c:\\reports"; i also have $string="c:\\reports"; i want to do a pattern match here like if ( $string=~m/$filepath/) { print "Found"; } But here within / / is it possible to give a variable name?? How do we specify a variable name inside / / in pattern matching.