in reply to very huge mysql request
Not a Perl solution, but look at LIMIT in the documentation for SELECT.