sub round { my ( $price, $round ) = @_; return int(( $price / $round ) + 0.5 ) * $round; } print round( 418, 10 ), "\n";