#!/bin/perl my @array = qw(1 2 3 4 5 6 7 8 9 10 11 12); my $data; my $div = 4; for my $i ( @array ) { my $j = $i % $div; push @{ $data->{$j || $div} }, $i; } use Data::Dumper; print Dumper \@array; print Dumper $data;
In reply to Re: Round robin processing
by siberia-man
in thread Round robin processing
by llarochelle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |