thatguy has asked for the wisdom of the Perl Monks concerning the following question:
The problem is whether or not it's possible to create variables from the output or value of other variables?
open(CONF," conf.file"); while(<CONF>) { ($variablecmd,$variablename,$newdata) = split(/ /, $_); if ($variablecmd eq "setVariable") { #create new variable named the current value of $variablename } elsif ($variablecmd eq "catVariable") { #assign data to varaible named $variablename } } close(CONF);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating new variables from the value of other variables
by larsen (Parson) on Jun 21, 2001 at 01:18 UTC | |
|
(jeffa) Re: Creating new variables from the value of other variables
by jeffa (Bishop) on Jun 21, 2001 at 01:22 UTC | |
|
Re: Creating new variables from the value of other variables
by John M. Dlugosz (Monsignor) on Jun 21, 2001 at 01:22 UTC | |
|
Re: Creating new variables from the value of other variables
by malloc (Pilgrim) on Jun 21, 2001 at 01:23 UTC | |
|
Re: Creating new variables from the value of other variables
by thraxil (Prior) on Jun 21, 2001 at 01:25 UTC | |
|
Re: Creating new variables from the value of other variables
by thatguy (Parson) on Jun 21, 2001 at 01:29 UTC |