MonjoMarisio has asked for the wisdom of the Perl Monks concerning the following question:
I am reading from a file and want to name different hashes according to the data in the file. For example, my file could simply be
0.01 0.02 0.03 0.04 1.01 1.02 1.03 1.04
from this, I want two hashes %001 and %002 to which I will assign the rest of the info in prelabeled keys.
I tried asigning from a match parenthesis memory, $1 but it gave me the following error message:
"Can't use string ("0.01") as a SCALAR ref while "strict refs" in use at ./perlexamples/partial_hasher line 6, <> line 1."
I would appreciate any help!
Thanks.
Monjo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash name from read file
by holli (Abbot) on Mar 07, 2006 at 09:44 UTC | |
|
Re: hash name from read file
by GrandFather (Saint) on Mar 07, 2006 at 09:49 UTC | |
|
Re: hash name from read file
by linux454 (Pilgrim) on Mar 07, 2006 at 15:29 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |