my $data = qq(SELECT * FROM messages..); my $sth = $dbh->prepare($data); $sth->execute();