sub round { my $temp=$_[0]; my $rounded=0; while ($temp>.5) { $temp--; $rounded++; } return $rounded; } print &round(23.9);