laziness, impatience, and hubris | |
PerlMonks |
Re: problematice metashar regexpby gjb (Vicar) |
on Apr 27, 2004 at 22:13 UTC ( [id://348654]=note: print w/replies, xml ) | Need Help?? |
One of the things that may go wrong is that you substitute in the result of a substitution. Consider the first character 'h', it's replaced by '^', but '^' can in turn be replaced by '~', depending on the order of the keys, something you don't control in a hash. Maybe this effect is intentional, but if not, it could be the source of your problem. If so, replace the global substitution by a while over the characters of the string. Hope this helps, -gjb-
In Section
Seekers of Perl Wisdom
|
|