![]() |
|
|
+ Search |
![]()
|
Oct 23rd, 2003 05:53
Colin Thomsen, Phil S., fabrizio vanzani,
You can do this by useing multilevel data structures.
An example would be:
$tmp="foo"
${$tmp} = "newdata";
You can also use:
$tmp="foo"
${"$tmp"} = "newdata";
Note by Colin Thomsen:
You can also do:
$tmp = "foo";
$$tmp = "newdata";
print "$foo\n";
This shows that $$tmp is equivalent to $foo