FireBird34 has asked for the wisdom of the Perl Monks concerning the following question:
Each file will contain a one liner only, in the format of:open(STATS, "/path/to/file"); @file = <STATS>; close STATS;
How would I be able to read this out of @file, so that I could write the hash as:%file=("key" =>value, "key1" =>value);
I was thinking of some snippits, but they would be way to long and complicated (and not needed), as I am sure there is a much easier way out there (basically I was going to run a few loops, but pointless I think). Any help would be appreciated.%file=("$key" =>value, "$key1"=>value);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Messing with hashes
by Paladin (Vicar) on Feb 07, 2003 at 04:13 UTC | |
by FireBird34 (Pilgrim) on Feb 07, 2003 at 05:16 UTC | |
by ihb (Deacon) on Feb 07, 2003 at 15:13 UTC | |
by jdporter (Paladin) on Feb 07, 2003 at 16:28 UTC | |
|
Re: Messing with hashes
by Cody Pendant (Prior) on Feb 07, 2003 at 04:25 UTC |