Help for this page

Select Code to Download


  1. or download this
    $ perl -c -we'f()+123'
    Useless use of addition (+) in void context at -e line 1.
    -e syntax OK
    
  2. or download this
    $ perl -we'my $hr; $hr->{stuff}{foo}'
    Useless use of hash element in void context at -e line 1.
    
  3. or download this
    $ perl -we'my $hr; $_ = \%{ $hr }; $_ = \%{ $_->{stuff} }; $_->{foo};'
    Useless use of hash element in void context at -e line 1.
    
  4. or download this
       ___________________ scalar context pad fetch. autovivifies
      /   ________________ deref
    ...
     |  |   |    |   /
    |--|-|------|-|----|
    $hr->{stuff}->{foo};
    
  5. or download this
    $hr->{stuff} //= {};