Before the loop remove the excess elements
splice @favs, 25; foreach (@favs){ [download]
In reply to Re^4: Limit loop by jwkrahn in thread Limit loop by htmanning