in reply to Re: Multiple uses of (?{ code }) do not appear to be called
in thread Multiple uses of (?{ code }) do not appear to be called
sub foo { my $window = "a b X20 c X5 d e X17 X12"; local our @o; my @m = ($window =~ m/(X\d+(?{ push @o, pos }))/g); print join(" ", "Matches:", @m, "\n"); print join(" ", "Offsets:", @o, "\n\n"); }
Update: Oops, this has already been said elsewhere in the thread. I didn't enter this thread at the root node.
|
|---|