Compare time in perl using subroutine : <p>I found the script to compare the time and get the return value. But that script not validating the following scenario properly. Please help me on this.</p>

<p>Script Path : <a href="http://perlprogramming.language-tutorial.com/2012/10/perl-function-to-compare-two-dates.html#recent" rel="nofollow">http://perlprogramming.language-tutorial.com/2012/10/perl-function-to-compare-two-dates.html#recent</a></p>

<pre><code>Input : 2015-07-01 00:50:00,2015-07-01 00:00:00, returns : 0
</code></pre>
