title: How can I use a query with placeholder inside quotes? (perl / postgresql)
body: <p>I'm trying to execute the following script:</p>
  
  <pre><code>#!/usr/bin/perl -w
  
  use strict;
  use DBI;
  
  my $db = "Pg";
  my $db_database = "whatever";
  my $user = "whatever";
  my $password = "whatever";
  
  my $dbh = DBI-&gt;connect("dbi:$db:dbname=$db_database", $user, $password);
  
  my $query = $dbh-&gt;prepare (q{SELECT
                     arrival_date - INTERVAL '? MINUTE'
                     FROM emails LIMIT 1})
    or die ("unable to prepare");
  $query-&gt;execute(60) or die("unable to execute");
  
  print $query-&gt;fetchrow_array, "\n";
  </code></pre>
  
  <p>(arrival_date has this format: timestamp with time zone NOT NULL default CURRENT_TIMESTAMP)</p>
  
  <p>The problem is that the question mark placeholder is not detected because its inside single quotes:</p>
  
  <pre><code>DBD::Pg::st execute failed: called with 1 bind variables when 0 are needed 
  </code></pre>
  
  <p>It does not help if I use qq{}, $1 placeholder, and tried a few variations with $dbh->quote. How can I make this work?</p>