in reply to Perl6 global regex matching
There's not much use in doing a global regex match with an anchored regex.
Furthermore, a global regex match returns a list of matches, so use a for-loop to iterate over them:
use v6; my $line = '124des123'; for $line ~~ m:g/ \d ** 2..3 / -> $match { say ~$match; }
Output:
124 123
|
---|
In Section
Seekers of Perl Wisdom