rhardy has asked for the wisdom of the Perl Monks concerning the following question:
# Near start of function which Builds %WordsHash if ( -f 'data/BuildWordsHash.dat' ) { # Get a reference to the read in WordHashs $rhWordsHash = retrieve('data/BuildWordsHash.dat') or die"ERROR: can +'t retrieve WordsHash!\n"; print keys %$rhWordsHash; %::WordsHash=%$rhWordsHash; #Put the WordsHash back into the right + hash. undef($rhWordsHash); print "Using data/BuildWordsHash.dat; Delete and rerun to rebuild Wo +rdsHash.\n"; return; } #... # Near end of function which build %WordsHash # Save a copy of this WordsHash for later use eval { store(\%::WordsHash, 'data/BuildWordsHash.dat'); }; print "Error writing to file: $@" if $@; return 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Storable.pm: Storing Multi-dimensional Hashes How?
by davorg (Chancellor) on Aug 04, 2000 at 12:52 UTC | |
|
Re: Storable.pm: Storing Multi-dimensional Hashes How?
by mikfire (Deacon) on Aug 04, 2000 at 16:48 UTC | |
|
Re: Storable.pm: Storing Multi-dimensional Hashes How?
by rhardy (Acolyte) on Aug 04, 2000 at 13:52 UTC |