more useful options | |
PerlMonks |
Re: How to get this not the usual round robin loopingby AnomalousMonk (Archbishop) |
on Oct 16, 2015 at 12:44 UTC ( [id://1145110]=note: print w/replies, xml ) | Need Help?? |
Here's a variation on hdb's (nice++) approach that uses List::MoreUtils::part(): If you don't like part(), you can use my @parts; push @{ $parts[ $steps[ $i++ % @steps ] ] }, $_ for ITEMS; I kinda don't like the stray $i variable wandering through the code, but if you wrap this all up in a distributor function, this is no longer an issue. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|