|
|
| Problems? Is your data what you think it is? | |
| PerlMonks |
Re^7: Why is "any" slow in this case?by LanX (Saint) |
| on Jul 30, 2025 at 21:41 UTC ( [id://11165881]=note: print w/replies, xml ) | Need Help?? |
|
> (all but two captures are thrown away each time) you are right I misremembered the /g, /c, pos(), \G mechanisms which only work in scalar context. Mea Culpa. But you can grep all @matches and post process them in pairs, like
If you want only two capture per string you can also use /gc to avoid an infinite loop.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||