Nov 012010
Force Perl to use integer arithmetic
Answer:
To force Perl to use integer arithmetic, instead of floating point, you just need to add the statement "use integer;" at the beginning of your script.
Example:
use strict;
use warnings;
use integer;
my $i = 10/3;
print $i;
It above program will print out 3 instead of 3.333..