Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: Re: Re: Re: Module to read a dumped file

by juo (Curate)
on Feb 12, 2003 at 15:12 UTC ( #234695=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Re: Module to read a dumped file
in thread Module to read a dumped file

Yes indeed after looking at storable it looks as a much more suitable solution as the files only have to be used in Perl. However when looking at the function of storage it will store a Hash table into a file but it restores it into a scalar. I have been unable to get it back into a hash table.

my %stages; $stages{job_choice}->{status}->{val}=""; $stages{job_choice}->{param_gui}->{val}="job_choice_gui.pl"; $stages{input}->{status}->{val}=""; use Storable; store \%stages, 'stages.test'; my $hashref = retrieve('stages.test'); # not good : result is a scalar my %hashref1 = %{do retrieve('stages.test')}; # This does the job but +it reports an error message.

I have found the solution. They should actually add this to the storable documentation.

my %hashref = %{retrieve('stages.test')};


Comment on Re: Re: Re: Re: Re: Re: Module to read a dumped file
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2014-04-23 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (541 votes), past polls