in reply to RE: keeping $$this defined locally
in thread keeping $$this defined locally
A program reads in a template (not mine) which has fields defined
first=one
second=two
then it reads in another file with stuff like
"adding $first and $second we get third"
i loop through the variables from the template, and pretty
much do this for each one (assume $newstring points at the
string above):
{
($variable, $value) = split("=", $linefromtemplate);
$$variable = $value;
$newstring = eval("return \"$newstring\");
}
Not beautiful I agree...but seemed a quick way of doing what
I want - only I dont want the newly associated variables
to be applicable outside of the scope of the block they
are declared in.
(And strict complains about it too)
Thanks
Specimen- Comment on RE: RE: keeping $$this defined locally
| Replies are listed 'Best First'. | |
|---|---|
|
RE (tilly) 3: keeping $$this defined locally
by tilly (Archbishop) on Oct 04, 2000 at 19:32 UTC | |
by Specimen (Acolyte) on Oct 04, 2000 at 19:37 UTC | |
|
RE: RE: RE: keeping $$this defined locally
by princepawn (Parson) on Oct 04, 2000 at 19:38 UTC |