title: Is there a more accurate way of determining the minimum version needed?
body: <p>I'm trying to learn Perl.  I write a script and then try to find out what the minimum version of Perl that's needed to run the script.</p>
  
  <p>I was told Perl comes with a program called <a href="https://metacpan.org/pod/Perl::MinimumVersion" rel="nofollow noreferrer"><code>perlver</code></a> which will determine the minimum version needed based on both syntax and by what's explicitly stated.</p>
  
  <p>I have the following code:</p>
  
  <pre class="lang-perl prettyprint-override"><code>#!/usr/bin/perl
  
  use utf8;
  use strict;
  use autodie;
  use warnings;
  use diagnostics;
  
  say "Hey";
  exit 0;
  </code></pre>
  
  <p>But when I run the script through <a href="https://metacpan.org/pod/Perl::MinimumVersion" rel="nofollow noreferrer"><code>perlver</code></a>, I get the following output:</p>
  
  <pre class="lang-none prettyprint-override"><code>[me@here PERL] $ perlver ex6-1 
  
  
     ------------------------------------  
   | file  | explicit | syntax | external |
   | ------------------------------------ |
   | ex6-1 | ~        | v5.8.0 | n/a      |
   | ------------------------------------ |
   | Minimum explicit version : ~         |
   | Minimum syntax version   : v5.8.0    |
   | Minimum version of perl  : v5.8.0    |
     ------------------------------------  
  
  [me@here PERL] $
  </code></pre>
  
  <p>It says that the minimum version based on sytax is <code>v5.8.0</code>.  But when I add <code>use v5.8.0</code> to the script, I get an error:</p>
  
  <pre class="lang-none prettyprint-override"><code>String found where operator expected at ./ex6-1 line 16, near "say "Hey"" (#1)
      (S syntax) The Perl lexer knows whether to expect a term or an operator.
      If it sees what it knows to be a term when it was expecting to see an
      operator, it gives you this warning.  Usually it indicates that an
      operator or delimiter was omitted, such as a semicolon.
  
      (Do you need to predeclare say?) (#2)
      (S syntax) This is an educated guess made in conjunction with the message
      "%s found where operator expected".  It often means a subroutine or module
      name is being referenced that hasn't been declared yet.  This may be
      because of ordering problems in your file, or because of a missing
      "sub", "package", "require", or "use" statement.  If you're referencing
      something that isn't defined yet, you don't actually have to define the
      subroutine or package before the current location.  You can use an empty
      "sub foo;" or "package FOO;" to enter a "forward" declaration.
  
  syntax error at ./ex6-1 line 16, near "say "Hey""
  Execution of ./ex6-1 aborted due to compilation errors (#3)
      (F) Probably means you had a syntax error.  Common reasons include:
  
          A keyword is misspelled.
          A semicolon is missing.
          A comma is missing.
          An opening or closing parenthesis is missing.
          An opening or closing brace is missing.
          A closing quote is missing.
  
      Often there will be another error message associated with the syntax
      error giving more information.  (Sometimes it helps to turn on -w.)
      The error message itself often tells you where it was in the line when
      it decided to give up.  Sometimes the actual error is several tokens
      before this, because Perl is good at understanding random input.
      Occasionally the line number may be misleading, and once in a blue moon
      the only way to figure out what's triggering the error is to call
      perl -c repeatedly, chopping away half the program each time to see
      if the error went away.  Sort of the cybernetic version of 20 questions.
  
  Uncaught exception from user code:
      syntax error at ./ex6-1 line 16, near "say "Hey""
      Execution of ./ex6-1 aborted due to compilation errors.
  </code></pre>
  
  <p>The error suggests that <code>say</code> isn't included in the <code>v5.8.0</code>.  So how can I accurately find out the minimum required version of Perl needed to run a script?</p>
  
  <p>Or might there be a complete list of Perl functions listed by verison number that I can parse myself to get the minimum version?</p>