title: Convert Unix Date "Wed Sep 15 14:21:36 2010" to unix timestamp in perl or MySQL to store in mySQL
body: <p>I am trying to convert a regular Unix date in human readable format back into unix timestamp without making arrays for Months and Days of the week. 
  Obviously the "%" needs to be escaped in perl
  I tried "%%" and "\%" and RTM, which is how I ended up with \%%<br></p>
  
  <pre><code>$myDate="Wed Sep 15 14:21:36 2010";
  $datePattern="\%%a \%%b \%%e \%%H:\%%i:\%%s \%%Y";
  </code></pre>
  
  <p>MySQL has a function</p>
  
  <pre><code>UNIX_TIMESTAMP (STR_TO_DATE (\'$myDate\' \, \'$datePattern\'))";
  </code></pre>
  
  <p>My final statement looks like this:
  The command works directly from mySQL but not when I call it from perl.</p>
  
  <pre><code>replace mytable values ('some value', UNIX_TIMESTAMP (STR_TO_DATE (\'$myDate\' \, \'$datePattern\')))";
  </code></pre>