In my CBC design, I'm pulling prices from a question outside the CBC and then multiplying times a set of constants. My code (which works) is:
$[%
Begin Unverified Perl
GETVALUE("Q2b") * 0.65;
End Unverified
%]
The problem is that depending on the value in Q2b, it sometimes shows up with 1 place after the decimal, sometimes with two, sometimes with none.
So, I'm trying to figure out how to modify the Perl script to always show 2 decimal places.
Thanks.
Format number in $x.xx format using Perl
Resolved
3 replies