use warnings; use strict; my $number = 28.5555; # round number to no decimal places. my $rounded = sprintf("%.0f", $number); print "$rounded\n";