Help for this page

Select Code to Download


  1. or download this
    C:\test>perl -Mstrict -E"$x = 1; $x = 10"
    Global symbol "$x" requires explicit package name at -e line 1.
    ...
    Execution of -e aborted due to compilation errors.
    
    C:\test>perl -Mstrict -E"my $x = 1; my $x = 10"
    
  2. or download this
    C:\test>perl -Mstrict -wE"my $x = 1; my $x = 10"
    "my" variable $x masks earlier declaration in same scope at -e line 1.