Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    use diagnostics;
    
  2. or download this
    $ perl -Mstrict -Mwarnings -le 'for (0..1) { our $x = $_ } print $x'
    Variable "$x" is not imported at -e line 1.
    Global symbol "$x" requires explicit package name at -e line 1.
    Execution of -e aborted due to compilation errors.
    
  3. or download this
    $ perl -Mstrict -Mwarnings -le 'use diagnostics; for (0..1) { our $x =
    + $_ } print $x'
    Variable "$x" is not imported at -e line 1 (#1)
    ...
        Global symbol "$x" requires explicit package name at -e line 1.
    Execution of -e aborted due to compilation errors.
     at -e line 1.