in reply to The skip directive in Parse::RecDescent

That's the expected behavior. The outer prefix is in effect until changed, but you changed it early in the rule, so the previous "whitespace skip" is effectively gone by the time you hunt for '%'.

To get what you want, you want:

'%' <skip:''> file
in your rule.

-- Randal L. Schwartz, Perl hacker