Text::Number 

use Text::Number;
my $allowance = number(value => 5, places => 2);

print "My allowance is \$$allowance dollars.\n";
print $allowance->places, "\n";
My allowance is $5.00 dollars.
2