I'm having trouble with this set of code.  I'm trying to navigate my way
through a VERY deep hash (aka hash with references to hash with
references to arrays with references to hashes, which may not contain
any values cause that's the way it was written before I got here).
Anyway, this is not supposed to be flexible in any way, I'm just trying
to hard code my way down to the bottom of the hash set just to prove I
can get there.  

I'm having a problem on the line where the ### is present.  I haven't
been able to see the keys from the hash referenced by $spot->{$key}.  So
far I have tried several things to get to them, listed under the code. 


 my $results = $test->{testing_results}{testing_result};
      if(ref($results) eq 'ARRAY') {
          for my $spot (@$results) {
             for my $key (keys %$spot) {
                if (ref($spot->{$key}) eq 'HASH') {
                   if($key eq 'value_group') {
                       ###my %vg = $spot->{$key};
                       $result .= $key . "<br>";
                   }
                }
             }
          }
      }

Previous attempts:
for my $morekeys (keys $spot->{$key}) {}
for my $morekeys (keys %$spot->{$key}) {}
for my $morekeys (keys %($spot->{$key})) {}
for my $morekeys (keys (%$spot->{$key})) {}

and as you can see in the line with the ### I was just trying to put it
into a new hash, but that is giving me this error:
Reference found where even-sized list expected 

Barry Jones
DATABUILT, Inc. The Global AEC Information Company
1476 Fording Island Rd. Bluffton, SC 29910
(843) 836-2166 office

"Life is like a dogsled team;
if you ain't the lead dog, the scenery never changes."
- Lewis Grizzard


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to