<p>How can I round a decimal number (floating point) to the nearest integer? </p>

<p>e.g.</p>

<pre><code>1.2 = 1
1.7 = 2
</code></pre>

You can either use a module like
Math::Round
:
```
```
use Math::Round;
my $rounded = round( $float );
```
```
Or you can do it the crude way:
```
```
my $rounded = sprintf "%.0f", $float;
```
```