Ed Sickafus wrote:
foreach $keyouter(sort keys %dbm) {
foreach $keyinner(keys %{$dbm{$keyouter}}){
If ($dbm{$keyouter}{$keyinner} == "LN")
{
print "localtime($dbm{$keyouter}) \t
Last Name = $dbm{$keyouter}{$keyinner}\n";
} ### <--- Line 69
else
{
print "\t\t
Dave K wrote:
Ed,
A 'cleaner' approach.
The central (as opposed to key) point:
In the expression:
$hash{$ohk}->{$ihk}
$hash{$ohk} is the _value_ of a hash, but that _value_ is a reference to a
hash,
so we can use the '->' syntax. Think of:
$hash{$ohk}->
as identifying that (pesky anonymous)
Ed,
A 'cleaner' approach.
#!/usr/bin/perl -w
use strict;
my %hash = (
fruits => {
favorite => "apples",
'second favorite' => "oranges",
},
vegetables => {
favorite => "corn",
'second favorite' => "peas",
'least favorite' => "turnip",
},
meats =>
We will get you there, eventually, ;-)...
Ed Sickafus wrote:
Although you all are trying, I'm still not getting it -- namely, how to use
the hash names in a HoH.
My reference shows the following template for a HoH:
outermost hash
| inner level of hashes
| | innermo