in reply to Applying regex to each line in a record.
It doesn't help that s/ and m/ imply different operation modes when prepended to the regex, "search and replace" and "match", respectively. And absence of anything in front implies m/.
In Section
Seekers of Perl Wisdom