Help for this page

Select Code to Download


  1. or download this
    $ perl -Mstrict -wE 'my $h = {foo=>"bar"}; my $c = keys ${$h};'
    
    Experimental keys on scalar is now forbidden at -e line 1.
    Type of arg 1 to keys must be hash or array (not scalar dereference) a
    +t -e line 1, near "};"
    Execution of -e aborted due to compilation errors.
    
  2. or download this
    $ perl -Mstrict -wE 'my $h = {foo=>"bar"}; my $c = keys $$h;'
    
    Experimental keys on scalar is now forbidden at -e line 1.
    Type of arg 1 to keys must be hash or array (not scalar dereference) a
    +t -e line 1, near "$h;"
    Execution of -e aborted due to compilation errors.
    
  3. or download this
    $ perl -Mstrict -wE 'my $h = {foo=>"bar"}; my $c = keys %{$h};'
    
  4. or download this
    $ perl -Mstrict -wE 'my $h = {foo=>"bar"}; my $c = keys %$h;'