On Mon, Sep 08, 2003 at 04:15:07PM -0700, Colin Kuskie wrote: > FYI, $text (remaining unmatched text) cannot be used as > a start-up action to preprocess text before parsing: > > Global symbol "$text" requires explicit package name at ./pt2hum line 58. > Execution of ./pt2hum aborted due to compilation errors. > > my $g2 = <<EOG; > > { ##Alter separation character > $text =~ tr/_/ /; } > > foo: /\w+/ > > EOG > > my $parser = Parse::RecDescent->new($g2) > or die "bad grammar\n";
After fixing the bad quoting of the HERE document you get the "real" error message: ERROR: Internal error in generated parser code! (Hint: Global symbol "$text" requires explicit package name at (eval 4) line 7. BEGIN not safe after errors-- compilation aborted at (eval 4) line 15. ) bad grammar Colin