my ( $sth ); eval { $sth = $dbh->prepare( qq/ select blech from blah / ); $sth->execute; }; if ( $@ ) { die "Something screwed up! Error: $@"; } ...