|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: Looping and countingby Riales (Friar) |
| on Apr 04, 2012 at 01:06 UTC ( #963340=note: print w/ replies, xml ) | Need Help?? |
|
I suppose you're fetching a row at a time within your for loops? It might be easier fetch the first 50 headlines (by putting a LIMIT in the SQL query) and grabbing all of them at once and putting that into an array. Then, you can just output the first 10 into the first file and the next 40 into the second file. Alternatively, you can use something like your existing for loop like so:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||