Help for this page

Select Code to Download


  1. or download this
    $ perl -Mstrict -Mdiagnostics -e'$foo = "bar";$bar = "baz";print $$foo
    +, $/'
    Global symbol "$foo" requires explicit package name at -e line 1
    Global symbol "$bar" requires explicit package name at -e line 1
    ...
    Global symbol "$foo" requires explicit package name at -e line 1
    Execution of -e aborted due to compilation errors
    $
    
  2. or download this
    $ perl -Mstrict -Mdiagnostics -e'my $foo = "bar";my $bar = "baz";print
    + $$foo, $/'
    Can't use string ("bar") as a SCALAR ref while "strict refs" in use at
    + -e line
            1 (#1)
    ...
    Uncaught exception from user code:
            Can't use string ("bar") as a SCALAR ref while "strict refs" i
    +n use at -e line 1
    $
    
  3. or download this
    $ perl -Mstrict -Mdiagnostics -e'my $foo = \my $bar; $bar = "baz"; pri
    +nt $$foo, $/'
    baz
    $