in reply to Re^2: Seeing the query used by a prepared statement
in thread Seeing the query used by a prepared statement

the above recommendations are probably better (i'm not looking at the dbi page right now, might say the same thing), but here's what i do:

my $select = qq/SELECT * /; my $from = qq/FROM db/; my $query = $select . $from; # print "SQL: $query\n"; my $sth = $dbh->prepare( $query ); $sth->execute;

note the print statement. also, it's not secure in any way - just for testing. also, iirc the perl taint doesn't effect dbi data - separate taint.