It is this "Without the /whatever modifier, whatever means ...; with the modifier it means..." locution that is the rationale for the kneejerk practice of always using the /xms constellation of modifiers with every regex regardless of whether . ^ $ appear in the regex or not, and regardless of the fact that /x arguably makes it a bit more messy to deal with whitespace.
I have adopted this practice, first encountered in the (in)famous PBP of TheDamian, because for me, regexes are hard enough without the further confusion of unnecessary degrees of freedom. Now, what does . (dot) match? Everything! YBPMV.
Update: See also re '/flags' mode, but I tend to avoid this in PM examples because it only appeared with Perl version 5.14 and has too narrow familiarity.
Give a man a fish: <%-(-(-(-<
In reply to Re^6: reg expression question
by AnomalousMonk
in thread reg expression question
by healingtao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |