*slaps forehead*
Yes, re-using the same variable works fine. Grr. Nothing like a bad case of the blindingly obvious, is there?
In the particular cases you bring up, using quotemeta might be a better option than mapping it to individual protected qr// objects. Not sure it matters all that much.
As for effeciency, I would hope that perl's regex engine would be smart enough to discard unnecessary non-capturing groups (which is the main side-effect of building up regexes with a bunch of smaller qr//s...)
In reply to Re: Re: Re: Re: qr// with /e?
by tkil
in thread qr// with /e?
by tkil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |