恥ずかしながら初めて知ったのだが、Perl5における空の正規表現パターン(m//とかqr//とか)はだいぶトリッキーな動作をするらしい。 http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operatorsに曰く、 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 are honored; the other flags are taken from the original pattern. If no match has previously