Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Counting the number of times several strings appear

by 2teez (Priest)
on Nov 13, 2012 at 17:29 UTC ( #1003676=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Counting the number of times several strings appear
in thread Counting the number of times several strings appear

Hi, gather a count of all of the lines that are the same
You may have to check each of the lines, because not all the lines are the same. e.g

User logged in successfully at 10:35:33 User logged in successfully at 10:35:34 User logged in successfully at 10:35:35 User logged in successfully at 10:35:37
The lines above are not the same, because of the changing time the user logged in.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me


Comment on Re^3: Counting the number of times several strings appear
Download Code
Re^4: Counting the number of times several strings appear
by cspctec (Sexton) on Nov 13, 2012 at 17:36 UTC

    Yes... sorry, those were bad examples...

    I have truncated all of the garbage that is different, such as the time the user logged in... The lines are the same in my script but I just can't figure out how to make the script keep a running total of each line that is the same as another line... I'm thinking I may have to use a LOT of variables to keep totals, or use the database suggested...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (18)
As of 2014-07-23 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (145 votes), past polls