in reply to Re: Comparing Hash key with array
in thread Comparing Hash key with array

OK - I will try and get a complete data dumper set of the date. In the meantime this seems to be my problem:
foreach my $key(keys %ret) { my $value = $ret{$key}; my @arr = @$value; print "$key\n"; foreach my $u(@lines) { print "$key @$u\n"; } }
The first FOREACH (if on it's own will print out the correct amount of keys in the hash.
However, as soon as I add the second FOREACH (to enter the array) the keys get replicate the same amount of times the loop iterates.

Replies are listed 'Best First'.
Re^3: Comparing Hash key with array
by Anonymous Monk on Feb 02, 2012 at 17:00 UTC

    OK - I will try and get a complete data dumper set of the date.

    It isn't really necessary, simply type/copy/paste to make %hash (or %ret) look the way you want.

    In the meantime this seems to be my problem

    Thanks, but I knew this much from your original posting, I can't infer your intent -- you use == to compare strings, and you switched from %hash to %ret