my $inc = 20; my $limit = $cgi->param('page') * $inc; my $query = "select * from table LIMIT $limit, $inc"