Subject: | Perl comment RE confused by '#' embedded in strings |
Hello
The to_eol sub in Regexp::Common::comment is confused when a string embeds the comment caracter. See for instance:
$ cat test.pl
use Regexp::Common qw/comment/;
use 5.10.1;
say $RE{comment}{Perl}->subs("foo('#') # foo\n" => "# bar");
$ perl test.pl
foo('# bar
I would expect the script to output
foo('#') # bar
All the best