in reply to Re: Limit loop
in thread Limit loop
foreach ( @favs[ 0 .. 24 ] ) {
Since the original post said only "a few of these favorite fields have more than 25", then most of the time, that will end up with one or more undef iterations on the loop, so then undef would have to be handled specially. Maybe via next unless defined; or similar logic.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Limit loop
by htmanning (Friar) on Aug 30, 2022 at 21:10 UTC | |
by pryrt (Abbot) on Aug 30, 2022 at 21:44 UTC | |
by jwkrahn (Monsignor) on Aug 30, 2022 at 21:57 UTC | |
by AnomalousMonk (Archbishop) on Aug 31, 2022 at 19:18 UTC |
In Section
Seekers of Perl Wisdom