Think about Loose Coupling | |
PerlMonks |
Re: Bug in substitution operator?by fullermd (Priest) |
on Jan 11, 2009 at 08:22 UTC ( [id://735481]=note: print w/replies, xml ) | Need Help?? |
Interesting. It does sound buggy. And it does the same thing with brackets too, notice. Simpler example:
Yields
(5.8 here) So something about having the delimiter be the same as your subscripting character makes it real hard to escape. For extra fun, notice that using two \'s in the sub fails as "replacement not terminated", and using 3 leaves one sitting in your string:
So it doesn't seem like you can all that easily work around it except by changing the delimiters. Maybe playing with escaping... yes, that seems to work:
Wackiness.
In Section
Seekers of Perl Wisdom
|
|