in reply to mathematical operator for integer division, "div" ?
With Perl 5.8, you can do the following:
use integer; my $result = 5/3; print "$result\n";
Otherwise, you can do something like:
my $result = int(5/3); print "$result\n";
Update: I believe my head is screwed on backwards today. ;-) Both result in 1. D'oh!
|
|---|