##
while (my @row = $sth_report->fetchrow_array) {
@row = map { $_ || ' ' } @row;
# .... rest of code
}
####
my %college;
while (my @row = $sth_report->fetchrow_array) {
@row = map { $_ || ' ' } @row;
my $college = pop @row;
push $college{$college}, [@row];
}
####
foreach my $college (keys %college) {
print "$college:\n";
foreach my $row (@{$college{$college}}) {
print "\t", join(', ', @$row),"\n";
}
}