in reply to Leashing DBI
My personal preference would be to enclose each table we're working with (and hence its associated SQL code) in a functional class. This then makes the main Perl code a *hodload* cleaner, and means any changes to data sources/field names/whatever can be made in the class modules without having to tweak the logical flow of the main program.