in reply to substitution of variable within a variable

What you are asking for is a very, very bad idea. It is called a "symbolic ref" and you can do it very easily in Perl, but you shouldn't. For details on how to do it, and how to stop yourself from doing it by accident, see the strict pragma. Also see perlref, which explains how to do hard references, the much, much safer way to get the job done.
  • Comment on RE (tilly) 1: substitution of variable within a variable

Replies are listed 'Best First'.
(ar0n: see the faq) RE (2): substitution of variable within a variable
by ar0n (Priest) on Sep 24, 2000 at 05:33 UTC
    Another good pointer would be this entry in perlfaq7, which discusses the faults of symbolic refs.

    update: another (better) discussion of the issue can be found here (by Mark-Jason Dominus).