Help for this page

Select Code to Download


  1. or download this
    my %hash = ( k0 => 'c0',
                 k1 => 'v1',
    ...
               );
    my $search = 'k2';
    my $val = $hash{$search};
    
  2. or download this
    my %hash = ( k0 => ['c0'],
                 k1 => ['v1'],
    ...
               );
    my $search = 'k2';
    my @vals = @{ $hash{$search} };