Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
foreach (@online) { if ($linkscount == 4) { $linkscount = 0; } $linkscount++; print "$_ :: $linkscount<br>\n"; if ($linkscount == 1) { push @links1, $_; } elsif ($linkscount == 2) { push @links2, $_; } elsif ($linkscount == 3) { push @links3, $_; } else { print "error!"; exit; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sorting an array
by bart (Canon) on Apr 07, 2007 at 11:35 UTC | |
|
Re: sorting an array
by shmem (Chancellor) on Apr 07, 2007 at 12:13 UTC | |
by Anonymous Monk on Apr 07, 2007 at 14:14 UTC | |
by shmem (Chancellor) on Apr 07, 2007 at 19:52 UTC |