Re: Hash names in a HoH ... stymied

2003-01-22 Thread Wiggins d'Anconia
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

Re: Hash names in a HoH

2003-01-20 Thread Wiggins d'Anconia
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)

Re: Hash names in a HoH

2003-01-20 Thread Dave K
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 =>

Re: Hash names in a HoH

2003-01-20 Thread Wiggins d'Anconia
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