Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Bizarre References Question

by abaxaba (Hermit)
on Feb 14, 2002 at 20:13 UTC ( [id://145545]=note: print w/replies, xml ) Need Help??


in reply to Bizarre References Question

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:
$stored_proc_list = [(qw(sproc1 sproc2 sproc3))]; $update_stats_xref = {sproc2=>"update_table2"}; $logfile = "somefile.txt"; 1; #Return true val

Then just require it. All of your vars then get populated without using the eval.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://145545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-20 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found