An example of the hash is as follows:

 

$tempHash1{one}=1;

$tempHash1{two}=2;

$tempHash1{three}=3;

$mainHash{first} = \%tempHash1;

$tempHash2{four}=4;

$tempHash2{five}=5;

$tempHash2{six}=6;

$mainHash{second} = \%tempHash2;

 

I don't know exactly what you mean but I've tried different variations using
eval and do and I still can't get the value back. I'm come to the conclusion
that the value can't be retrieved after using Dumper to dump the value.
Perhaps you can prove me wrong? Bill Luebkert has suggested using Storable
and this works with this type of hash.

 

Eric

 

  _____  

From: Jeff Saxton [mailto:[email protected]] 
Sent: 27 September 2010 02:57
To: Eric Robertson; [email protected]
Subject: RE: Restoring Dumped Values

 

just "do" it ;)

 

  _____  

From: [email protected]
[[email protected]] On Behalf Of Eric Robertson
[[email protected]]
Sent: Sunday, September 26, 2010 3:12 PM
To: [email protected]
Subject: Restoring Dumped Values

I've produced a complicated hash that has as its values anonymous hashes and
I want to store the hash in a text file and then in another program use this
text file to reconstitute the original hash. Using Data::Dumper I've
succeeded with the first part and produced the text file with 'print OUT
Dumper (%hash)' but using eval with the contents of the file doesn't
reproduce the original hash file.

 

Am I attempting the impossible, or if not how should I set about
reconstituting to the original hash?

 

 

Eric Robertson

 

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.856 / Virus Database: 271.1.1/3160 - Release Date: 09/26/10
08:01:00


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to