From perlop:
If the PATTERN evaluates to the empty string, the last successfully matched regular expression is used instead.
This isn't obvious (or often useful) behavior, but it's documented behavior. You can subvert this with a regex assertion such as a comment:
if ($r =~ /(?#avoid empty pattern)$r2/) { ... }
It's not a CGI bug. It's an insufficient encapsulation bug with regard to Perl 5 itself.
In reply to Re: Is this a bug ?
by chromatic
in thread Is this a bug ?
by i5513
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |