in reply to array of arrays of hashes

Well, I think the first thing to do would be to finish defining what the task is, in terms of what specific sort of output(s) you really want; this will help to figure out what sort of data structure to use.

What you've said so far about the task is:

count the number of packets from one ip to another ip within the same port

but I don't quite understand what that means. Based on the code you've posted, you apparently start with an input list that has two IP addresses per line (separated by ' > '), with or without a port number on one or both addresses.

Can you give a brief but specific example of some actual input, along with the desired output it should produce? I'm afraid I can't guess this from what you've said so far.

Replies are listed 'Best First'.
Re^2: array of arrays of hashes
by cotarelo (Initiate) on Nov 17, 2009 at 10:02 UTC
    Thanks for the answer, Indeed it has no sense what I asked, Actually what I want to visualize the flows from a dump file and get a clarified idea of what is happening on the net. My first step was counting the number of packets from each source implied in the dump (IP A) to each source connected (IP B), in all port (port a, b c). True my question was wrong asked.