in reply to Re^2: Help with function, count matches and store in hash & retrieve sorted
in thread Help with function, count matches and store in hash & retrieve sorted
Well, after looking yet again, I am still not sure. Can you give use the exact inputs that you are using so that we can run and exactly replicate your error with your data?
I am a bit puzzled about how you can get an undef value for $max_count? Which is assigned to the key "max". Of course:
I guess I have the Sunday brain cramp.my $element; $element->{bar} = $key; $element->{max} = $max_count; $element->{max} //= 0; #### adding this prevents undef push @match_count, $element;
|
|---|