in reply to Re^4: Storing/parsing perl data structure in/from a file
in thread Storing/parsing perl data structure in/from a file

It's correct that do file means slurp + eval but your data only defines an anonymous hash on the top level.
{ alpha => { beta => { gamma => theta, delta => lambda, }, beta => { gamma => zeta, }, }, },

you need to add a variable name!

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^6: Storing/parsing perl data structure in/from a file
by Wilderness (Novice) on Jun 13, 2013 at 00:22 UTC
    How can I manually slurp + eval if I have a named hash?
        Great ! Thanks, Rolf ! Is there a way to do this with multi-level hashes?