Do you know where your variables are? | |
PerlMonks |
Counting Occurences, (hash referencing another hash)by penguinfuz (Pilgrim) |
on Jul 16, 2002 at 18:52 UTC ( [id://182198]=perlquestion: print w/replies, xml ) | Need Help?? |
penguinfuz has asked for the wisdom of the Perl Monks concerning the following question:
Fellow monks, I have pondered, read, rewritten, (and consumed a couple pints) in the process for enlightenment; I now ask for divine intervention. My basic goal is to take a source and destination IP address pair, count the occurences of destination IPs, and insert into a database along the line of "srcIP, dstIP, visit_count". The trouble I have is counting the occurences. =( My thoughts (at this point) look like: Now for the code snippet (which only counts accesses at the moment): I have left 2 commented lines in the 'foreach' loop, which hopefully illustrate my thought process. BTW: Cheers for counting ideas!
Back to
Seekers of Perl Wisdom
|
|