 <p>I tried your initial way <em>with</em> the following:</p> <pre><code>use strict; use warnings; use Time::Piece; my $time = Time::Piece-&gt;strptime( "07/26/2014 00:23:09", "%m/%d/%Y %H:%M:%S"); print $time; </code></pre>