[Pdx-pm] Escaping a character in a string from a file
John
jgoalby at hotmail.com
Wed May 12 15:32:53 CDT 2004
Sorry for not verifying this before. Generally I am good at doing that
before posting (hangs head in shame).
I was creating HTML output. Turns out when I was showing the results in the
HTML the \ caused problems due to some javascript. When I tried to recreate
with print statements it worked just fine.
Sorry again!
John.
> -----Original Message-----
> From: pdx-pm-list-bounces at mail.pm.org [mailto:pdx-pm-list-
> bounces at mail.pm.org] On Behalf Of John
> Sent: Wednesday, May 12, 2004 1:28 PM
> To: 'pdx.pm '
> Subject: RE: [Pdx-pm] Escaping a character in a string from a file
>
> 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.
>
> John.
>
> > -----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
> > file
> > 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
> > work.
> >
> > 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
> > 0095
> > <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
> > training!
> > _______________________________________________
> > Pdx-pm-list mailing list
> > Pdx-pm-list at mail.pm.org
> > http://mail.pm.org/mailman/listinfo/pdx-pm-list
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at mail.pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list
More information about the Pdx-pm-list
mailing list