in reply to diagnostics: warning, deprecation, error
All of these diagnostics are explained in perldiag.
$ 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.
$ 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.
$ perl -e'$/ = \0;' Setting $/ to a reference to zero is forbidden at -e line 1.
Bad data.
$ perl -e'$/ = { };' Setting $/ to a HASH reference is forbidden at -e line 1.
Bad data.
$ perl my $x = <<. Use of bare << to mean <<"" is forbidden at - line 1.
Bad syntax. Non-word terminators must be quoted.
$ 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".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: diagnostics: warning, deprecation, error
by Anonymous Monk on Feb 10, 2026 at 16:01 UTC | |
by ikegami (Patriarch) on Feb 10, 2026 at 17:48 UTC | |
by Anonymous Monk on Feb 14, 2026 at 21:32 UTC | |
by marto (Cardinal) on Feb 17, 2026 at 09:26 UTC | |
by Anonymous Monk on Feb 20, 2026 at 20:59 UTC | |
| |
by ikegami (Patriarch) on Feb 17, 2026 at 15:22 UTC | |
|