Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: substrings that consist of repeating charactersby salva (Canon) |
on Sep 29, 2020 at 12:41 UTC ( [id://11122328]=note: print w/replies, xml ) | Need Help?? |
IIRC, once perl sees $& anywhere in the program code, it starts to populate that variable (and $' and $`) for all the regular expression matches in the program. Using it impacts the performance of all the regular expressions in the code, not just those ones where it is actually needed!
In Section
Seekers of Perl Wisdom
|
|