[Pdx-pm] Escaping a character in a string from a file

John jgoalby at hotmail.com
Wed May 12 15:03:57 CDT 2004


I have a file of regular expressions I want to match.  I read in the file
and then match each entry as such:

if ($something =~ /$tomatch/i)

I want to be able to specify something like ".pl" in the file so that I can
match all perl files.  Specifying .pl matches .apl.  Is there a way I can
escape the "." when it is in a file?  I tried "\.pl", but it didn't work.

Any pointers would be very much appreciated.

Thanks

John.



More information about the Pdx-pm-list mailing list