Try the ref() function.
if (ref($hash{$data}) eq 'HASH') {}
Hth. Sid.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf
Of Pete Emerson
Sent: Thursday, December 06, 2001 9:03 AM
To: [EMAIL PROTECTED]
Subject: detecting a hash of hashes
Here is an exampl
Hi,
Use the "ref" function, it returns the type (or false if
not a reference). Assuming it's either a scalar or another
hash do this:
foreach my $data (keys %hash) {
if (not ref($hash{$data})) {
print "\$hash{$data} --> $hash{$data}\n";
} else {
foreach my $second (keys %{$hash{$dat