title: How to calculate the difference between two timestamp strings in Perl
body: <p>I searched through all the possible questions but couldn't find the answer,
  so can Perl experts help me on this one?</p>
  
  <p>I have two timestamps like <code>05/25/2011 05:22:03 PM</code> and <code>05/25/2011 05:34:08 PM</code>. They are stored in <em>string</em> form. </p>
  
  <pre><code>my $str1 = '05/25/2011 05:22:03';
  my $str2 = '05/25/2011 05:34:08';
  </code></pre>
  
  <p>The latter being the time of a job ending and former being the time it started.</p>
  
  <p>How do I find out the difference in dates and time?  The dates are the same in this case but they could differ as well.</p>