Hi, recently someone posted to the Perl-Win32-Admin mailing list a CGI error message he had got which included the string ""use" may clash with future reserved word at <file> line <line>". I seemed to recall that this could be due to running a perl5 script through perl4, and confirmed that guess on an HP-UX system which came with perl 4.036. Since perldiag.pod is so friendly as to list several error messages that come from putting a Perl script through sh or csh, I suggest adding two messages (an error message and a warning) that can arise from running a Perl5 script through a perl4 interpreter. Comments on the formatting and text are welcome; an email copy is appreciated as well. I left off the "at %s line %d" from the "may clash with future reserved word" warning since that seems to be the practice with other messages as well, but with the "syntax error", I left them in since the "next 2 tokens" appears to be a magic word that says "Perl4" to people who've seen the message before. Cheers, Philip --- pod/perldiag.pod.orig Fri Aug 24 06:53:40 2001 +++ pod/perldiag.pod Fri Aug 31 19:57:47 2001 @@ -1879,6 +1879,12 @@ shows in the regular expression about where the problem was discovered. See L<perlre>. +=item "%s" may clash with future reserved word + +(W) This warning may be due to running a perl5 script through a perl4 +interpreter, especially if the word that is being warned about is +"use" or "my". + =item % may only be used in unpack (F) You can't pack a string by supplying a checksum, because the @@ -3336,6 +3342,12 @@ (A) You've accidentally run your script through the Bourne shell instead of Perl. Check the #! line, or manually feed your script into Perl yourself. + +=item syntax error in file %s at line %d, next 2 tokens "%s" + +(F) This error is likely to occur if you run a perl5 script through +a perl4 interpreter, especially if the next 2 tokens are "use strict" +or "my $var" or "our $var". =item %s syntax OK End of patch. -- Philip Newton <Philip.Newton@gmx.net>Thread Next