in reply to
construct variable name on the fly
print ${"var$_"}."\n" for (1..2);
${'var1'} gives the same results as $var1.
Comment on
Re: construct variable name on the fly
Download
Code
In Section
Seekers of Perl Wisdom