my $foo = "12314212412124124124.10623"; my $text = int(sprintf("%0.2f", $foo)); print $text,"\n";