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
In reply to RE: RE: keeping $$this defined locally
by Specimen
in thread keeping $$this defined locally
by Specimen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |