Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

How do I save a nested structure to a file (and read it later)?

by entropy (Sexton)
on Apr 17, 2001 at 00:53 UTC ( [id://72942]=perlquestion: print w/replies, xml ) Need Help??

entropy has asked for the wisdom of the Perl Monks concerning the following question: (data structures)

How do I save a nested structure to a file (and read it later)?

Originally posted as a Categorized Question.

  • Comment on How do I save a nested structure to a file (and read it later)?

Replies are listed 'Best First'.
Re: How do I save a nested structure to a file (and read it later)?
by merlyn (Sage) on Apr 17, 2001 at 00:54 UTC
Re: How do I save a nested structure to a file (and read it later)?
by ton (Friar) on Apr 17, 2001 at 01:45 UTC
    You can also use Data::Dumper, which is not as efficient but is human readable.
Re: How do I save a nested structure to a file (and read it later)?
by Malkavian (Friar) on Apr 17, 2001 at 14:53 UTC
    I've got a personal favourite of FreezeThaw which is pretty friendly, and does the job nicely.
      FreezeThaw will definitely do the job, you might also want to look into Data::Dumper - especially if you want to manually edit the data while it's in the file.
      print FILE Dumper(%foo); $bar = <FILE>; %foo = eval{$bar};

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://72942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found