in reply to Re^3: updating a variable call in a hash table
in thread updating a variable call in a hash table

It doesn't matter where your template string comes from, it's still a string containing some markup.

It's the same question with the same answer: use a templating system. Consider:

use warnings; use strict; for my $color (qw(green blue red puce)) { my $text = "The color is COLOR\n"; $text =~ s/COLOR/$color/g; print $text; }

prints:

The color is green The color is blue The color is red The color is puce

Perl's payment curve coincides with its learning curve.