Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Help with function, count matches and store in hash & retrieve sorted

by Marshall (Canon)
on Jul 03, 2017 at 00:50 UTC ( [id://1194062]=note: print w/replies, xml ) Need Help??


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

I updated my post Re: Help with function, count matches and store in hash & retrieve sorted, is that helpful to you?

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:

my $element; $element->{bar} = $key; $element->{max} = $max_count; $element->{max} //= 0; #### adding this prevents undef push @match_count, $element;
I guess I have the Sunday brain cramp.
  • Comment on Re^3: Help with function, count matches and store in hash & retrieve sorted
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1194062]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found