On Jul 13, The Ghost said:

   foreach my $col (keys %{$ref}) {
            $results[$x]{$col}=$ref->{$col};
   }
   $x++;}

The @results array holds hash references...

foreach my $result (@results) {
    foreach my $key (keys {$results[$x]}) {

Here you want to do:

      foreach my $key (keys %$result) {

since each element in @results is a hash-ref, and $result is an element from @results, you need to gets its keys. Since $result is a hash reference, you need to write %$result to get at the hash.

      print "$key: $result{$key}\n";

Likewise, that should be $result->{$key}.

   }    }

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to