in reply to Writing a hash of two variables to a file
First, you'll have to open your file. Note that if you want to append to it, you'll need to make use of '>>', but you may just wish to overwrite your file on successive writes ('>')
If you just try to print your %hash directly to the file, all your file will contain is something like "HASH(0x923483)" something not easily parsable (Thanks, ikegami). You might want to think of some way to loop through your hash keys and print out the data in a way that you can read back in later.
If you need more of a push in the right direction, let us know.
BTW, welcome to the monastery, Resin ... even though you've been around a while, I see that this is your first post to SoPW!
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Writing a hash of two variables to a file
by Resin (Novice) on Oct 25, 2006 at 03:23 UTC | |
by ikegami (Patriarch) on Oct 25, 2006 at 04:30 UTC | |
by wfsp (Abbot) on Oct 25, 2006 at 09:06 UTC | |
|
Re^2: Writing a hash of two variables to a file
by ikegami (Patriarch) on Oct 25, 2006 at 02:44 UTC | |
by Resin (Novice) on Oct 25, 2006 at 03:17 UTC | |
by GrandFather (Saint) on Oct 25, 2006 at 03:53 UTC |