Hash of list : Hash Collections « Hash « Perl






Hash of list

    

%hash_of_lists = (
    List_1 => [1, 2, 3],
    List_2 => ["Red", "Yellow", "Blue"],
);

print "$hash_of_lists{List_1}[1]", "\n";

   
    
    
    
  








Related examples in the same category

1.Hash of Hashes
2.Hash of Hashes with Lists of Values
3.List of hash
4.Use hash as an array
5.Nested hashes