title: Perl compare version numbers 5.1 < 5.10
body: <p>I am having difficulties in comparing 2 versions. If we have 5.1 and 5.10 then 5.1 should be smaller than 5.10. I know that in decimal it should read 5.01 and 5.10. But is there a way to compare it using 5.1 and 5.10?</p>
  
  <pre><code>perl -e 'use warnings; use version; if (version-&gt;parse("5.1") &lt; version-&gt;parse("5.10")) { print "ok"; }'
  </code></pre>