Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
matching lines in a long stringby Cristoforo (Curate) |
on May 30, 2020 at 00:29 UTC ( [id://11117487]=perlquestion: print w/replies, xml ) | Need Help?? |
Cristoforo has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks! 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.
Back to
Seekers of Perl Wisdom
|
|