Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Call for code samples!

by argus (Acolyte)
on Nov 15, 2001 at 23:15 UTC ( [id://125645]=note: print w/replies, xml ) Need Help??


in reply to Call for code samples!

Not sure if this is what you are looking for, but this is something I wrote to parse some log files while running load tests on DNS servers:

if(m/(([0-9]+)-((?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec))-( +[0-9]+))\s+((?:0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9].[0-9]{3}) +\s+(.*)\/(\d+.\d+.\d+.\d+)\/($lookingfor)\/(a).*/i) { ## Notes: # $1 = Whole Date (DD-MMM-YYYY) # $2 = Day (DD) # $3 = Month (MMM as text) # $4 = Year (YYYY) # $5 = Time (HH:MM:SS.sss) # $6 = Queries info stuff (is not used) # $7 = IP of requesting name server # $8 = what we look for ($lookingfor variable) # $9 = type of record (A/MX/CNAME) }
not awfully complicated, though.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-06-20 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.