in reply to Safe undumping

Simply remove { %TABLE = (); } from line 17. $parser->file(...) will reuse entries already encountered in past calls to $parser->file(...).

If you want to option to clear the table, add the following rule to the grammar:
clear_table: { %TABLE = (); }
and do
$parser->clear_table('')
to clear it.
$parser->clear_table()
may also work, but may cause warnings under use strict.

(Untested, since the program in the linked article doesn't run on my system. I guess my dumper gives something different than his.)

Replies are listed 'Best First'.
Re^2: Safe undumping
by pip9ball (Acolyte) on Nov 11, 2004 at 01:21 UTC
    Excellent! Thanks!

    -P