P is for Practical | |
PerlMonks |
Re: Quickie Question: search and replace problemby indigo (Scribe) |
on Apr 19, 2001 at 00:19 UTC ( [id://73644]=note: print w/replies, xml ) | Need Help?? |
Basically, $data is intepreted as a string, and $attempt1 as a regex, so if you have special regex characters, they will never match up, no matter how you escape them. To make a regex treat $attempt1 as a string, use \Q and \E: man perlre for more info. Updated: Added rant, as per tye :)
In Section
Seekers of Perl Wisdom
|
|