in reply to sprintf on floating point

I found it. If you numerically add zero to the sprintf result, it works:
my $var = sprintf "%1.2f", '0.001'; print "\$var = " . ($var + 0) . "\n";