in reply to Re: Perl & modulus
in thread Perl & modulus

Here is a nice chunk of code that uses modulus to control looping:
my ($returnNum) = 0; for my $block (@blocks) { printf ("%-15s ", $block); print "\n" unless (++$returnNum % 5); } print "\n";