Hi Monks,
I'm having trouble finding out how to define a hash of hash of hashes ( I think this is what I want). I just have some hashes of hashes and I realized that I need to pass a parameter to determine which hash of hash i'll be using. Therefore, I thought the hash of hash of hash would be the best solution.
my %Businesses = (
my %teams = (
NFL => { 'JETS' => 1, 'PATRIOTS' => 1, 'GIANTS' => 1 },
MLB => { 'YANKEES' => 1, 'METS' => 1, 'CARDINALS' => 1 },
NBA => { 'SIXERS' => 1, 'CELTICS' => 1, 'LAKERS' => 1 },
);
my %restaurants = (
FASTFOOD => { 'WENDYS' => 1, 'MCDONALDS' => 1, 'BURGER KIN
+G' => 1 },
FINEDINING => { 'GRILL 23' => 1, 'CAPITAL GRILL' => 1, 'MO
+RTONS' => 1 },
MIDRANGE => { 'OUTBACK' => 1, 'TEXAS ROADHOUSE' => 1, 'CH
+ILIS' => 1 },
);
);
If the parameter passed in was "teams" then I would use a for loop to dereference teams, but if the parm was restaurants then I'd dereference those.
CAn someone please let me know how to define the hash of hash of hashes? and then dereference them?
Thank you very much for taking the time