2009/2/3 Stuart Clarke <stuart.clarke1986 / gmail.com>:
> I have worked out the problem but I am a little unsure how to solve it.
>
> We have counts which holds all of the event ID's, however |d, cnt| is
> not counting the number of matching ID numbers and it just assigns each
> ID the number 1.

What does that mean? What's in the Hash?

> So given this example, we would expect cnt to find the ID of ?? as
> occuring more than 5 times and ignore the rest:
>
> MonFeb022009
> MonFeb022009
> MonFeb022009
> MonFeb022009
> MonFeb022009
> MonFeb022009
> MonFeb022009
> TueAug052008
> TueAug052008
> WedAug062008
>
> However instead cnt is ust placing the number 1 for each ID for example
>
> 1
> 1
> 1
> 1
> 1
> 1
> 1
> 1
> 1
> 1
>
> Can anyone help me with a fix? Many thanks

Frankly, you lost me there.  Please do this:

require 'pp'

File.open('/tmp/log', 'w') {|io| io.write(counts.pretty_inspect)}

And look at the output and / or post it here.

robert

-- 
remember.guy do |as, often| as.you_can - without end