Dear monks, I am trying to build the name of a variable using the content of another variable. How can I access the content of this new variable? I hope the question is clear, but I am giving here a small example: <\p> <code> my $fruit = "orange"; my $name_var = "size_$fruit"; # name of the new variable my $size = $($name_var); # ??? does not work <\code>
Seems something very trivial to do, but I cannot find how to do it in the PERL manual... Thank you very much for your kind help. <\p>
Sorry, I am very confused how to use this tagging stuff :( <\p>
In reply to Interpolation in variable names by ddc_nh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |