in reply to using other variables as keys to hash
%family = ( simpsons=>{ father => "homer", mother => "marge", son => "bart", daughter => "lisa", }); #deprecated maggie $string = "simpsons"; @array = ("simpsons"); %hash = ("family" => "simpsons"); print("$family{$array[0]}{son}\n"); print("$family{$hash{family}}{daughter}\n");
|
|---|