Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: webserver common log format file script

by ww (Bishop)
on Sep 06, 2011 at 12:22 UTC ( #924370=note: print w/ replies, xml ) Need Help??


in reply to webserver common log format file script

We may need just a little more help from you to offer help to you. Detail for us: what are the criteria by which a log entry should be ignored?

Working that one out, explicitly, may even give you the answer. :-)

But, that said, suggest you replace:

|| ($values[8]=~m/(304)/) || ($values[8]=~m/(302)/) || ($values[8]=~m/(301)

with

|| ($values[8]=~m/(30[124]/)

The use of the character class -- essentially meaning 'any of the elements inside the square brackets' will make your code more readable (and hence, more maintainable).


Comment on Re: webserver common log format file script
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2015-07-02 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (37 votes), past polls