Perl Monk, Perl Meditation | |
PerlMonks |
Re: Bizarre References Questionby abaxaba (Hermit) |
on Feb 14, 2002 at 20:13 UTC ( [id://145545]=note: print w/replies, xml ) | Need Help?? |
I cannot adequately comment on the coredump. I do think the $value = $$value causes issue -- in my mind, you're saying that \$value = $value; Or, pointer to memory location of $value = content of memory location of $value. Nevermind that $value is a scalar, not a scalar ref, to begin with. What I don't really understand is the ($value) = ($$value) bit. Why using list syntax lets this work is for others more experienced than I to answer. But hey, whatever works... I would, however, suggest one thing. As opposed to reading the text, then using eval to "perlfy" it, why not do something like this: Change your current "config.txt" to "config.pl", and rewrite thusly:
Then just require it. All of your vars then get populated without using the eval.
In Section
Seekers of Perl Wisdom
|
|