I often get confused as to which is which myself.
This is the point of TheDamian's injunctions in Perl Best Practices (PBP) to always use the /m and /s (and /x) modifiers (BPs 148 and 151 – and 147) in every match and regex object definition: . ^ $ always behave the same way and confusion is at least reduced if not eliminated.
In reply to Re^2: example of 'm / / m' related example and compare to 'm / / s'
by AnomalousMonk
in thread PERL regex modifiers for m//
by rockstar99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |