Help for this page

Select Code to Download


  1. or download this
    $hash{$italian} = [ $spanish ];
  2. or download this
    $hash = ( uno => [ 'uno' ],
              due => [ 'dos' ],
              # and so on
             );
    
  3. or download this
    # by assigning directly to the second element of the sub-array
    $hash{$italian}[1] = $french;
    ...
              due => [ 'dos','deux' ],
              # and so on
             );
    
  4. or download this
    for my $key (keys %hash){
      print $key, ' => ', join ' , ', @{$hash{$key}}; # dereference sub-ar
    +ray
      print "\n";
    }