|laziness, impatience, and hubris|
matching lines in a long stringby Cristoforo (Curate)
|on May 30, 2020 at 00:29 UTC||Need Help??|
Cristoforo has asked for the wisdom of the Perl Monks concerning the following question:
Been working on this problem and can't find my error. I'm trying to use the m modifier to read a large text in line by line. I want to use the inline form, (?m) rather than following the regex slash with m.
I wonder if anyone can see why it isn't working. The output is:
It isn't reading 'line by line'. Thanks for any help you might offer!
Update: It works ok without the extra specifiers if i just do for my $line (split/\n/, $s)
But wondering why.