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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Limit loop
by pryrt (Abbot) on Aug 30, 2022 at 21:55 UTC |
In Section
Seekers of Perl Wisdom