Help for this page

Select Code to Download


  1. or download this
    perl -MData::Dumper -e 'my %h; print "yes\n" if exists $h{d}{j}; print
    + Dumper \%h;'
    $VAR1 = {
              'd' => {}
            };
    
  2. or download this
    if(defined $h{d} && exists $h{d}{j}) {...}
    
  3. or download this
    my %hash;
    $hash{d}{j} = 'foo';
    
  4. or download this
    my %hash;
    $hash{d} ||= {};
    $hash{d}{j} = 'foo';