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($,,$;,$*,$/)
In reply to Re: Writing a hash of two variables to a file
by chargrill
in thread Writing a hash of two variables to a file
by Resin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |