http://www.perlmonks.org?node_id=127465


in reply to How do I find if anything was removed from using the int or sprintf function?

Here is one way to do it, using int:
my $total = $sth->rows; my $perPage = 20; my $pageCount = int(($total + $perPage - 1) / $perPage);