Maybe it's a bug, maybe it's an obscure feature. Anyway, this is a fragile construct for border-checking of the flip-flop operator as it will be broken by a regex match within the if-block.
The required information for such a check is provided by the flip-flop operator itself: it returns the current "loop number", with "E0" appended to the final loop call.
Here is a more robust version:
perl -le 'print for a .. h' | perl -nle 'if (my $ff = (/d/ .. /h/)) { +next unless $ff =~ /(?:^1|E0)$/; print }'
Greetings,
-jo
In reply to Re: Empty pattern in regex
by jo37
in thread Empty pattern in regex
by choroba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |