![]() |
|
Just another Perl shrine | |
PerlMonks |
Re^2: Limit loopby pryrt (Abbot) |
on Aug 30, 2022 at 20:59 UTC ( #11146512=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|