$top = $page * 20 - 19; $bottom = $top + 19; # A clearer Alternative: $bottom = $page * 20; $top = $bottom - 19;