I want to round numbers in Perl when printing to output file. I know there's some Math module that I can call, but I'm having trouble with it on my pc.
my $total = 10; my $counter = 3; my $average = ($total/$counter); print Output_file "$average\n"; #do something here
In the end I just want something that prints 3.33, and NOT 3.333333333 Thanks in advance for anyhelp, Kind regards
In reply to Rounding numbers by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |