Help for this page

Select Code to Download


  1. 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
    
  2. 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
    
  3. or download this
    $ perl -Mstrict -E 'BEGIN { require warnings if 1==1 } my $x; say $x+1
    +'
    1
    
  4. 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
    
  5. 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.
    
  6. or download this
    package if;
    
    ...
    sub unimport { shift; unshift @_, 0; goto &work }
    
    1;
    
  7. or download this
    $ perl -wMstrict -E '@_ = (1, 2, ()); say 0+@_'
    2
    
  8. or download this
    use if CONDITION, MODULE => ();
    
  9. or download this
    use if CONDITION, MODULE;