my $qry = qq(select contador, cod_entidad_oim, cod_agr, cod_operacion from mapcom_portext.TR0685002 where fch_hor_operacion between to_date(?,'dd-mon-yyyy') and to_date(?,'dd-mon-yyyy')); #### my $sth = $dbh->prepare($qry); $sth->execute($now, $onehourago);