390 diagnostic warnings, deprecations, errors in perl 5.002b3 Feb 03, 1996:
perl -MHTTP::Tiny -le'$|++;for(split/\n/,HTTP::Tiny->new->get("https:/ +/fastapi.metacpan.org/source/LWALL/perl5.002b3/pod/perldiag.pod")->{c +ontent}){print${1}and$-++if/^=item\s+(\S\S.*)$/}print(($-+1)," diagno +stic warnings, deprecations, errors in perl 5.002b3 Feb 03, 1996")'
1104 diagnostic warnings, deprecations, errors in perl v5.42.0 Compiled at Dec 17 2025:
perl -MConfig=compile_date -le'$|++;for(`perldoc -u perldiag`){print${ +1}and$-++if/^=item\s+(\S\S.*)$/}print(($-+1)," diagnostic warnings, d +eprecations, errors in perl $^V ").compile_date()'
What is forbidden?
perl -MConfig=compile_date -le'$|++;for(`perldoc -u perldiag`){print${ +1}and$-++if/^=item\s+(\S\S.*)$/}print(($-+1)," diagnostic warnings, d +eprecations, errors in perl $^V ").compile_date()' | grep 'forbidden'
Experimental %s on scalar is now forbidden
Initialization of state variables in list currently forbidden
Setting $/ to a reference to %s is forbidden
Setting $/ to %s reference is forbidden
Use of bare << to mean <<"" is forbidden
Use of strings with code points over 0xFF as arguments to vec is forbidden

Replies are listed 'Best First'.
Re: diagnostics: warning, deprecation, error
by ikegami (Patriarch) on Feb 10, 2026 at 14:43 UTC

    All of these diagnostics are explained in perldiag.

    Experimental %s on scalar is now forbidden
    $ perl -e'my $x = { }; keys $x;' Experimental keys on scalar is now forbidden at -e line 1. Type of arg 1 to keys must be hash or array (not private variable) at +-e line 1, at EOF Execution of -e aborted due to compilation errors.

    Bad operand type, but it was once accepted by an experimental feature.

    Initialization of state variables in list currently forbidden
    $ perl -e'use feature qw( state ); ( state $x ) = 123;' Initialization of state variables in list currently forbidden at -e li +ne 1, near "123;" Execution of -e aborted due to compilation errors.
    $ perl -e'use feature qw( state ); state( $x ) = 123;' Initialization of state variables in list currently forbidden at -e li +ne 1, near "123;" Execution of -e aborted due to compilation errors.

    Never supported.

    Setting $/ to a reference to %s is forbidden
    $ perl -e'$/ = \0;' Setting $/ to a reference to zero is forbidden at -e line 1.

    Bad data.

    Setting $/ to %s reference is forbidden
    $ perl -e'$/ = { };' Setting $/ to a HASH reference is forbidden at -e line 1.

    Bad data.

    Use of bare << to mean <<"" is forbidden
    $ perl my $x = <<. Use of bare << to mean <<"" is forbidden at - line 1.

    Bad syntax. Non-word terminators must be quoted.

    Use of strings with code points over 0xFF as arguments to vec is forbidden
    $ perl -e'my $x = chr( 0x2660 ); vec( $x, 0, 1 );' Use of strings with code points over 0xFF as arguments to vec is forbi +dden at -e line 1.

    Bad data. This is basically a friendly version of "Wide character in %s".

      no longer supported

      perl -MConfig=compile_date -le'$|++;for(`perldoc -u perldiag`){print${ +1}and$-++if/^=item\s+(\S\S.*)$/}print(($-+1)," diagnostic warnings, d +eprecations, errors in perl $^V ").compile_date()' | grep -i 'no long +er supported'
      \C no longer supported in regex; marked by S<<-- HERE> in m/%s/
      ${^ENCODING} is no longer supported
      $* is no longer supported as of Perl 5.30
      $# is no longer supported as of Perl 5.30
      

      did you mean

      perl -MConfig=compile_date -le'$|++;for(`perldoc -u perldiag`){print${ +1}and$-++if/^=item\s+(\S\S.*)$/}print(($-+1)," diagnostic warnings, d +eprecations, errors in perl $^V ").compile_date()' | grep -i 'did you + mean'
      (Did you mean &%s instead?)
      (Did you mean "local" instead of "our"?)
      (Did you mean $ or @ instead of %?)
      do "%s" failed, '.' is no longer in @INC; did you mean do "./%s"?
      length() used on %s (did you mean "scalar(%s)"?)
      Perl %s required (did you mean %s?)--this is only %s, stopped
      $[ used in %s (did you mean $] ?)
      

      crash

      perl -MConfig=compile_date -le'$|++;for(`perldoc -u perldiag`){print${ +1}and$-++if/^=item\s+(\S\S.*)$/}print(($-+1)," diagnostic warnings, d +eprecations, errors in perl $^V ").compile_date()' | grep -i crash
      Locale '%s' is unsupported, and may crash the interpreter
      

        Do you have a point or a question?