in reply to Re: How do I return a hash from Parse::RecDescent?
in thread How do I return a hash from Parse::RecDescent?
I know you just copied the OP, but return \%hash; should be just \%hash.
His return $item{"expr(s)"} should be just $item{"expr(s)"}.
P::RD actions (i.e. code blocks in curlies) are placed in a do, not a sub. Since return shouldn't be used to exit a do, return shouldn't be used to exit a P::RD action.
|
|---|