Help for this page

Select Code to Download


  1. or download this
    $hash{red}{green}{brown} = { }
  2. or download this
    my $ptr = \%hash;
    $ptr = $ptr->{$_} = {} for @array[0..$#array-1]; # fixed; s/shift @arr
    +ay/$_/
    $ptr->{$array[-1]} = 1;
    
  3. or download this
    my $ptr = \%hash;
    $ptr = $ptr->{shift @array} = {} while @array > 1;
    $ptr->{$array[0]} = 1;