You can use overload to change the meaning of regexps. It works like this: you can redefine the meaning of //, s///, qr//... literals so that perl applies some to them before compiling to internal form. This way, you can change \b's to some look{ahead,behind} expression, or better still, use some other escape sequence for that.
I have no example code for this. I am sure I have once seen one, but I can't find it.
Update: as ysth said, that code is in the perlre pod. Sorry.
In reply to use overload qr
by ambrus
in thread Re-define Word Boundary?
by JimJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |