title: incorrect Perl syntax yields incorrect error message
body: <p>The following (much stripped-down) code has an obvious error.</p>
  
  <pre><code>#!/usr/bin/env perl
  
  use strict;
  use warnings FATAL=&gt;"all";
  
  my $err_phyle;
  my $verb;
  
  sub do_measure
  {
    print($error_phyle "xxx");
  
  }
  
  sub dye
  {
  }
  
  dye "invalid verb \"$verb\"";
  </code></pre>
  
  <p>You'd expect the error message to be:</p>
  
  <pre><code>Global symbol "$error_phyle" requires explicit package name at example.pl line 11.
  example.pl had compilation errors.
  </code></pre>
  
  <p>... but it's actually ...</p>
  
  <pre><code>String found where operator expected at example.pl line 19, near "dye "invalid verb \"$verb\"""
  </code></pre>
  
  <p>(Note that the second error message doesn't add "example.pl had compilation errors.".)</p>
  
  <p>In the real program, the error message pointed to a line hundreds of lines of code away from the actual error. Incorrect error messages, pointing to the wrong line, can lead to much merriment trying to track down the syntax error.</p>
  
  <p>I can "fix" this in the above program by surrounding the argument of the call to function <code>dye</code> with parentheses, and I guess I'll go through the program and do this. But is this a bug in Perl, or (as is more likely the case) am I missing something about how Perl works?</p>