in reply to Printing SQL query in Perl

Probably you want DBI->trace. See the DBI docs for the parameters/options.