in reply to Re: crazy hashes
in thread crazy hashes

push @{$Bad_Host_Rows{dirname($row[1])}{$row[0]}}, [@row];
Changed it to the above and still getting the same results.

More Info:
After I push all the data onto the hash, I return it using:
return (bless (\%Bad_Host_Rows));
and retrieve it by using:
$badrows = $base->get_Bad_Rows(qw/host request fulldatetime/);

Then using these lines:
%hasher = %{$badrows}; print Dumper(\%hasher);
Thanks again for your help.

Replies are listed 'Best First'.
Re: Re: Re: crazy hashes
by Aragorn (Curate) on May 25, 2004 at 14:22 UTC
    You get a perfectly good hash reference back from get_Bad_Rows(). Why copy it into another hash and then display that?
    $badrows = $base->get_Bad_Rows(qw/host request fulldatetime/); print Dumper($badrows);
    works fine.

    Arjen

      no reason. 
      
      I did some more testing and the hash gets filled properly.  The problem happens when I send it back via:
      
      return (bless (\%Bad_Host_Rows));
      
      and retrieve it using:
      
      $badrows = $base->get_Bad_Rows(...)
      
      are these lines bad?
      
        Hmm. How do you return the hash from get_Bad_Rows()? I can't remember seeing this kind of output from a single Dumper() call. Are you calling Dumper() twice by accident? Some more code from the initialization of the object and of the get_Bad_Rows() method would help to get to the problem.

        Arjen