Do you mean something like this:
$count+=1; if ($$hashRecordPtr{"price_product$count"} ne "" ) { print "<tr bgcolor=\"#EDEFF5\">"; if ($$hashRecordPtr{"connection${count}_description!} ne "") { print<<"CONNECTION1"; <td valign="middle" align="center" width="78">$$hashRecordPtr{"connect +ion${count}_size${count}"}</td> CONNECTION1 } # etc... }
Note that in some cases I've had to use ${varname} rather than $varname in order to disambiguate the variable name from the rest of the string.
For future reference, it's helpful if you create a short extract of code which demonstrates your problem. And if you clean your code (add indentation - stuff like that) so that it's easy to read.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Interpolation in a hash key
by davorg
in thread Interpolation in a hash key
by pickledegg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |