The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

use 5.010;
use Test::More 'no_plan';
my $parser = do{
qr{
^ <test> $ (?# <notarule> )
<rule: test>
a test # some <other> here
}xms;
};
my $target = q{a test};
ok +($target =~ $parser) => 'Matched';