It's no bug, but a feature. Quote from perlop:
m/PATTERN/cgimosx
(...) If the PATTERN evaluates to the empty string, the last successfully matched regular expression is used instead. In this case, only the "g" and "c" flags on the empty pattern is honoured - the other flags are taken from the original pattern. If no match has previously succeeded, this will (silently) act instead as a genuine empty pattern (which will always match).
In this particular case, the last successfully matched regular expression is "(1)(2)". which matches neither "1" (i.e. $t), nor "2" ($u).
In reply to Re: Empty qr// fails to match -- Is this known bug?
by almut
in thread Empty qr// fails to match -- Is this known bug?
by chibiryuu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |