my $y = 1.5; $y = sprintf "%.0f", $y; my $x = 2.5; $x = sprintf "%.0f", $x; print "$y\n$x\n";