Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: How to save and reload my hash

by lepetitalbert (Abbot)
on Nov 20, 2005 at 15:16 UTC ( [id://510245]=note: print w/replies, xml ) Need Help??


in reply to Re: How to save and reload my hash
in thread How to save and reload my hash

Hello dear Monks,

first thanks for you answers.

I first tried : (cos it's the shortest)

use Storable; # fill my hash store \%host_info, 'file'; %host_info = (); %host_info = %{retrieve('file')}; # print my hash

This worked. Don't know what I did yesterday, when I used

store \%host_info, 'file';

(probably not exactly that) It had a file with just

pst01234(and some unprintable chars).

Maybe I should not code until 6am.

Thank you all.

Have a nice day !

"There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Replies are listed 'Best First'.
Re^3: How to save and reload my hash
by Errto (Vicar) on Nov 20, 2005 at 17:28 UTC
    The output that Storable produces is not meant to be human-readable. So it's probably true that whatever you were doing worked just fine. You just have to sort of trust (or test it) that when you read it back in using retrieve it'll come out ok.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-23 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found