Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^17: Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)

by karlgoethebier (Abbot)
on Jun 20, 2015 at 13:46 UTC ( [id://1131261]=note: print w/replies, xml ) Need Help??


in reply to Re^16: Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)
in thread Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)

"...Yet another statement pulled out of your ass...your own bullshit..."

Now pipe down and come back to the basic theme.

Given this task for learning experience:

  • Parse a Apache Logfile
  • Format is <LogFormat "%h %l %u %t \"%r\" %>s %b" common>
  • Extract the seven fields
  • Don't use a module
  • Special cases don't matter

Note: Your data must look like this: my $line = qq(127.0.0.1 - - [22/Apr/2015:13:35:04 +1000] "GET /bin/admin.pl HTTP/1.1" 401 509);, as in the example by kcott.

Inquisitorial question: How would you accomplish this?

I think the OP would appreciate this very much.

Karl

P.S.: Cnagf qbja abj naq fubj gung qnza pbqr!

«The Crux of the Biscuit is the Apostrophe»

  • Comment on Re^17: Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found