Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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

Replies are listed 'Best First'.
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?
[Discipulus]: discutere in eatalian is neutral: but discutere with wife sounds implicitly negative..
[erix]: what's the offending signature?
[Discipulus]: 'give man a fish erix it sonds like a push towards omosexuality.. ;=)
[Discipulus]: see Re: from txt file to array erix
[erix]: yeah, I ask for the text (I don't see signatures)
[Discipulus]: dear brother karl has "Furthermore I consider that Donald Trump must be impeached as soon as possible" in his sig
[erix]: ah, thanks Discipulus
[1nickt]: erix perhaps you could kindly point out your technique to roho and everyone will be happy.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2017-06-22 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (519 votes). Check out past polls.