in reply to Sorting data pulled in by DBI
You could modify your SQL to use "GROUP BY college" and "ORDER BY student_id". Also, you could use Perl's sort function. This will negate the need for your loops and be much cleaner code.