title: How to check perl version
body: <p>the default Perl version installed on my machine is the 5.8.7. 
  When I run my script internally switch to another perl version (v5.10.1) doing this:</p>
  
  <pre><code>  my $perl_5_10 = "/opt/perl_5.10.1/bin";
    $ENV{'PATH'}  = $perl_5_10 ":" . $ENV{'PATH'};
  </code></pre>
  
  <p>Now, I have to check the perl version, and I do:</p>
  
  <pre><code>   ## PERL: need perl version &gt;= 5.10!
     if ($] &lt; 5.010000)
     {
       ## VERSION ERROR!
     }
  
     my $perl_cmd = "perl --version";
     my $perl_str=`$perl_cmd`;
     print "PERL VERSION = " . $perl_str;   ## this clearly print 5.10.1
  </code></pre>
  
  <p>it return error as the version used is 5.8.7 and that's pretty normal as I ran my script with that version. But my problem is: </p>
  
  <p>how can I check that the new perl version is >= 5.10.1 ?</p>