- or download this
my %cats;
...
# @row contains the retrieved row
push $cats{ $row[1] }, $row[0]; # "Hash of arrays structure"
# End of loop to get a row
- or download this
for my $c (sort keys %cats){
my $values = $cats{ $c };
print "$c\t", join (" ", @$values), "\n";
}
- or download this
my $ItemsPerLine=3;
...
print "\n" unless $#$values % $ItemsPerLine==0;
}