Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$n=0;$m=2; sub l{ 'oXoXoXoX' =~ /(?:.X(?{return "Yes n=$n" if ++$n==$m}))*/ } print &l; 1 fails ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Have to abruptly return in a regex
by LanX (Saint) on Jan 10, 2022 at 16:17 UTC | |
|
Re: Have to abruptly return in a regex
by LanX (Saint) on Jan 10, 2022 at 16:05 UTC |