in reply to Re: Hash Problems
in thread Hash Problems

How can I take the array out of the equation? I have tried using foreach, while loops etc... and I can't seem to get around the array. I just want to go through each key of temp_dcr and compare some of the values. Would there be a way to do this using the each function?

Replies are listed 'Best First'.
Re: Re: Re: Hash Problems
by chipmunk (Parson) on May 16, 2001 at 23:51 UTC
    The array of keys is not a problem. That's not what I was referring to.

    My suspicion is that the value of $temp_dcr{$key} is not a reference to a hash, which is what you are using it as in this snippet of code. I think that it is actually a reference to an array.

    An easy way to check is with Data::Dumper:

    use Data::Dumper; print Dumper %tmp_dcr; # if %tmp_dcr is too big, just dump $tmp_dcr{$key} for one of the keys