http://qs321.pair.com?node_id=1228619


in reply to Reading a hash structure stored in a file

The key advice is in the error: did you forget to declare "my %hash1"?

So add "my %hash1;" either to your script, or the evaled file. Somewhere before assigning to it.

Replies are listed 'Best First'.
Re^2: Reading a hash structure stored in a file
by haukex (Archbishop) on Jan 15, 2019 at 21:21 UTC
    So add "my %hash1;" either to your script, or the evaled file.

    Unfortunately that won't help in this case, since the file being evaled contains a my %hash1 declaration that'll mask a %hash1 declared in the main code.