my $q = qq(select myfield from mytable order by mydate); my $sth = $dbh->prepare($q);