I wanted to use embedded code ... Now I can optimize a lot of my regexes with it.
Beware. Such "optimization" is often a snare and a delusion. Many times it is more conducive to efficiency to understand how the Perl regex engine captures and returns groups and to take advantage of these inherent mechanisms. Also be aware that previous to Perl version 5.18 (I think), there existed a bug that caused weird interactions between embedded regex code and "external" (if that's the right term) my variables.
OTOH of course, sometimes embedded code is just the only way to do it. :)
Give a man a fish: <%-{-{-{-<
In reply to Re^3: Problem with capturing all matches with regex
by AnomalousMonk
in thread Problem with capturing all matches with regex
by igoryonya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |