poltras has asked for the wisdom of the Perl Monks concerning the following question:
I call the external program which gives me the list of symbols to replace (and their replacements can be easily computed in the script). Those symbols may contains characters like . [ { ] } ( and others.
I've searched on the web for more than 10 hours straight, and haven't found a way of doing $SomeStuff =~ s/$match/$replace/g while having special characters in the $match variable. Nor there seems to be any other way of doing it. I don't even know if I can do it in Perl.
I'm exhausted and I want to sleep and be over with it :P. So please help me. Your karma will be rewarded.
Thanks in advance,
Hans :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Search and Replace fears
by reasonablekeith (Deacon) on Jul 11, 2005 at 14:52 UTC | |
|
Re: Search and Replace fears
by reasonablekeith (Deacon) on Jul 11, 2005 at 15:31 UTC | |
|
Re: Search and Replace fears
by jhourcle (Prior) on Jul 11, 2005 at 14:57 UTC | |
by reasonablekeith (Deacon) on Jul 11, 2005 at 15:17 UTC |