title: What does "Error: Illegal declaration of subroutine" signify?
body: <p>I got an error from my Perl module "Error:  Illegal declaration of subroutine". What does that mean? I tried googling for it and got <a href="http://perldoc.perl.org/perl592delta.html" rel="nofollow noreferrer">the following unhelpful information</a>:</p>
  
  <blockquote>
    <p>There is a new compilation error,
    Illegal declaration of subroutine, for
    an obscure case of syntax errors.</p>
  </blockquote>
  
  <p>The code which caused the error is like this (truncated to show the problem):</p>
  
  <pre><code>    $dbh-&gt;do ($stm); # ACTUAL ERROR IS THE SEMICOLON HERE
      or croak "Can't insert using '$stm': ", $dbh-&gt;errstr;
      return $dbh-&gt;last_insert_id ('', '', '', '');
  }
  
  sub insert_check # ERROR MESSAGE IS PRINTED FOR THIS LINE
  {
      my ($dba, $table, $set) = @_;
  </code></pre>