Hashes (Associative Arrays)
$foodtype{"Spaghetti"} = "Italian";
$thetype = $foodtype{"Spaghetti"};
foreach $food (keys %foodtype) {
$thetype = $foodtype{$food};
print "Food $food is $thetype\n";
}
Previous slide
Next slide
Back to first slide
View graphic version