my ($returnNum) = 0; for my $block (@blocks) { printf ("%-15s ", $block); print "\n" unless (++$returnNum % 5); } print "\n";