in reply to Why won't this basic Parse::RecDescent example work?

Another variation that doesn't produce the expected output:
our %HASH; my $grammar = <<'END_OF_GRAMMAR'; startrule : from_clause from_clause : 'from' dir(s) { print "-->$item{dir}<--\n"; } dir : "hello" | "world" END_OF_GRAMMAR my $parser = Parse::RecDescent->new($grammar); $parser->startrule("from hello world"); use Data::Dumper; say Dumper(\%HASH); --output:-- --><-- $VAR1 = {};
Expected output:
-->SOMETHING<-- $VAR1 = { "dirs" => "SOMETHING"; };