Help for this page

Select Code to Download


  1. or download this
    $s = 123;
    $s = 456;
    ...
    $h{foo} = 123;
    $h{foo} = 456;
    print "$h{foo}\n";  # 456
    
  2. or download this
    push @{ $h{$k} }, 123;
    push @{ $h{$k} }, 456;
    print "$_\n" for @{ $h{$k} };  # 123, 456