in reply to Re: Perl Template::Toolkit combining variables?
in thread Perl Template::Toolkit combining variables?

Hey Jethro, what I want or better need to do is a concatenation of two variables in the template. Usually you concatenate two variables with a "." as in:

$Variable1."-".$Variable2;
Output:

Value1-Value2

This doesn't work in the template.

Depending on what utilization ratio a programmer has, a certain value needs to be output in the template. This is why I need to make the template variable dynamic.

The first part of the variable is:

[% TimeData.RemainingTimeNEW- OR [% TimeData.RemainingTimeASSIGNED-
Now I need to concatenate the second part of the variable.

[% TimeData.RemainingTimeNEW-UtilRatioPercent %]
I tried the following solutions but with no luck:

[% TimeData.RemainingTimeNEW-_UtilRatioPercent %] [% TimeData.RemainingTimeNEW-$UtilRatioPercent %] [% TimeData.RemainingTimeNEW-${UtilRatioPercent} %] [% TimeData.RemainingTimeNEW-.UtilRatioPercent %]
The variable should be read out as:

TimeData.RemainingTimeNEW-75

Where the 75 is variable

Hope this sheds some light on what I want.

Regards,

Fred