|
|
| There's more than one way to do things | |
| PerlMonks |
Re^3: Regex: match a word stem plus an optional suffix from a groupby Your Mother (Archbishop) |
| on Jul 21, 2022 at 02:40 UTC ( [id://11145622]=note: print w/replies, xml ) | Need Help?? |
|
You should also escape interpolated stuff in regexen. \Q${wordstem}\E in this case. If you don’t, you can end up with really confusing bugs and, depending on Perl version, a malicious regex that can be a DoS attack. I would encourage you to use /x to improve readability. Something like–
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||