Help for this page

Select Code to Download


  1. or download this
    $hash = {
        'key' => ['one', 'two', 'three']
    }
    
  2. or download this
    
    while ( my ($key,$string) = each %oldhash ) {
    ...
    print $newhash{$key}->[0], "\n"; 
    # print out all of the elements for a given key
    print "$key: ", join @{$newhash{$key}}, '-', "\n";