jcpunk has asked for the wisdom of the Perl Monks concerning the following question:
i shall try to explain that again so that i am hopefully more clear. i have a file with data in it like $data = stuff. and i need to figure out how to assign stuff to $data without knowing it is $data that i am processing but knowing that the thing to the left of the equals sign is $data.
i could have a giant long sent of if statements but i would rather not do that as i have about 100 or so things to read in from this file every time my front end for the script begins, which while not frequently is occasional enough that i would rather not do it that way (and it would take a hell of a lot of time to code in)
so does anyone have an elegant solution or do i begin coding ifs?
thanks for your time
jcpunk
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: dynamic scalar names?
by chromatic (Archbishop) on Aug 01, 2003 at 21:34 UTC | |
Re: dynamic scalar names?
by waswas-fng (Curate) on Aug 01, 2003 at 21:37 UTC | |
Re: dynamic scalar names?
by dga (Hermit) on Aug 01, 2003 at 21:41 UTC | |
Why it's stupid to `use a variable as a variable name'
by PodMaster (Abbot) on Aug 01, 2003 at 21:48 UTC | |
(jeffa) Re: dynamic scalar names?
by jeffa (Bishop) on Aug 02, 2003 at 13:20 UTC | |
Re: dynamic scalar names?
by liz (Monsignor) on Aug 01, 2003 at 21:35 UTC |