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


in reply to Looping and counting

MySQL, for example, has a limit x,y clause for the select statement, and it is more-or-less designed for handling this.   Your result set will contain only the specified range of rows (if they exist).