- or download this
$ perl -Mstrict -E 'use warnings; my $x; say $x+1'
Use of uninitialized value $x in addition (+) at -e line 1.
1
$ perl -Mstrict -E 'use warnings (); my $x; say $x+1'
1
- or download this
$ perl -Mstrict -E 'use if 1==1, warnings => (); my $x; say $x+1'
Use of uninitialized value $x in addition (+) at -e line 1.
1
- or download this
$ perl -Mstrict -E 'BEGIN { require warnings if 1==1 } my $x; say $x+1
+'
1
- or download this
$ perl -MO=Deparse,-p -e 'use if 1==1, warnings => ()'
use if (1, 'warnings', ());
...
$ perl -Mstrict -E 'use if (1, "warnings", ()); my $x; say $x+1'
Use of uninitialized value $x in addition (+) at -e line 1.
1
- or download this
$ perl -wMstrict -E 'use open ()'
$ perl -wMstrict -E 'use if 1==1, open => ()'
...
$ perl -wMstrict -E 'use if 1==1, List::Util => ()'
Bareword "List::Util" not allowed while "strict subs" in use at -e lin
+e 1.
Execution of -e aborted due to compilation errors.
- or download this
package if;
...
sub unimport { shift; unshift @_, 0; goto &work }
1;
- or download this
$ perl -wMstrict -E '@_ = (1, 2, ()); say 0+@_'
2
- or download this
use if CONDITION, MODULE => ();
- or download this
use if CONDITION, MODULE;