in reply to Limit loop
TIMTOWTDI: use the LIMIT term of split: @favs = split /~~~/,$favorites, 25;
use a counter inside the loop, and last when the counter is above 25: state $counter=0; last if ++$counter>=25;
In Section
Seekers of Perl Wisdom