![]() |
|
Just another Perl shrine | |
PerlMonks |
Re^2: Converting HoA into AoHby robin (Chaplain) |
on Oct 31, 2005 at 17:40 UTC ( #504371=note: print w/replies, xml ) | Need Help?? |
Using glob is a delightful trick, but in general you really need to escape the string much more than this. (To see what I mean, try putting a * in one of the strings.) Instead of s/ /\\ /g, use s/(\W)/\\\\\\$1/g. I know it’s a lot of backslashes, but you really do need that many here!
In Section
Seekers of Perl Wisdom
|
|