I'm at a loss to explain this behavior. Is this correct? Or is it a bug.
This is version 5.005_03 built for i386-linux.
#!/usr/bin/perl
my $html = qq( abcdef );
sub check
{
my $pattern = shift;
my @br;
eval "\@br = ' abcdef ' =~ m/$pattern/x";
die "$@\n" if $@;
print "PATTERN=m/$pattern/x\n";
print "ANSWER = ";
print join("-",@br),"\n";
}
check('(?-x:(abcdef))');
check('(?-x:(abcdef)) # comment here');
executing this produces
PATTERN=m/(?-x:(abcdef))/x
ANSWER = abcdef
PATTERN=m/(?-x:(abcdef)) # comment here/x
ANSWER =
I think both check's should produce the same results. Am I right or wrong?