Perl question re arrays/variable names
Hey all,
I'd like to read a text file into an array, which includes variable names which I want to resolve during the load. So far the vars are being stored in the array literally. How could I store them resolved?
For example, the text file might include:
This is a $test variable.
the code might be:
$test="funky_var";
$index=0;
while ($array[$index++] = <FILE_IN>){}
# this doesn't work -- I see 'This is a $test variable'.
Thanks for any help!
Jon
|