Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: s///g within m//g regionsby almr (Sexton) |
on Nov 09, 2021 at 13:21 UTC ( [id://11138611]=note: print w/replies, xml ) | Need Help?? |
Well, something like iterating over matches (for my $m( $str =~ m/^# START.*?^# END.*/mg ) { update_match( $m ); }.
In this case, yes, I could reshape into a line-list, but what about other "region" definitions, and possibly multiple regions in a line?
In Section
Seekers of Perl Wisdom
|
|