# how I do it now $tmpl->param(flag_location => "foo $var bar"); # I have not used hashes here to make it easier # to see the two things I am trying to do. # how I want to do it my $param = 'flag_location'; $tmpl->param($param => "foo $var bar"); # or better still my $param = 'location'; $tmpl->param("flag_$param" => "foo $var bar");