[Pdx-pm] Escaping a character in a string from a file
jgoalby at hotmail.com
Wed May 12 15:28:00 CDT 2004
Oh! I tried to recreate the problem in a simpler example and it worked.
Obviously some side effect of something else I am doing. I will post my
stupidity as soon as I find it.
> -----Original Message-----
> From: pdx-pm-list-bounces at mail.pm.org [mailto:pdx-pm-list-
> bounces at mail.pm.org] On Behalf Of Randal L. Schwartz
> Sent: Wednesday, May 12, 2004 1:21 PM
> To: John
> Cc: 'pdx.pm '
> Subject: Re: [Pdx-pm] Escaping a character in a string from a file
> >>>>> "John" == John <jgoalby at hotmail.com> writes:
> John> I have a file of regular expressions I want to match. I read in the
> John> and then match each entry as such:
> John> if ($something =~ /$tomatch/i)
> John> I want to be able to specify something like ".pl" in the file so
> that I can
> John> match all perl files. Specifying .pl matches .apl. Is there a way
> I can
> John> escape the "." when it is in a file? I tried "\.pl", but it didn't
> Uh, that should have, with the code you have above. Can you show
> an example of it not working?
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
> <merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
> Pdx-pm-list mailing list
> Pdx-pm-list at mail.pm.org
More information about the Pdx-pm-list