in reply to getting hashes out of config files
The above snippet is just a guess, of course.{ local $/; open FILE, "<$filename" or die "Can't open $filename for reading: +$!"; %myhash = eval ( <FILE> ); close FILE; }
You should look into FreezeThaw for storing data of this type in a file. Each data structure can be reduced to a single string (freeze) and then restored (thawed) quite easily.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just go the the link and check out our stats.
|
|---|