- or download this
print sprintf("%0.02f",0.345);
- or download this
perl -E 'print sprintf("%0.18f",0.346);'
- or download this
#!/usr/bin/env perl
use strict;
...
if ($tprice < 1 && length($tprice) > 4) {
print "SPRINTF - $tprice - " . sprintf("%0.18f",$tprice) . "\n";
}