Help for this page

Select Code to Download


  1. or download this
    use List::Util qw(reduce);
    use Data::Dumper;
    ...
    
    reduce { $a->{$b} ||= {} } \%d, @c;
    print Dumper \%d;
    
  2. or download this
    $VAR1 = {
              '1' => {
    ...
                              }
                     }
            };
    
  3. or download this
    (reduce { $a->{$b} ||= {} } \%d, @c[0..$#c-1])->{$c[$#c]} = 42;
    print Dumper \%d;
    
  4. or download this
    $VAR1 = {
              '1' => {
    ...
                              }
                     }
            };