Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 (Prior)
on Jun 20, 2015 at 13:46 UTC ( #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
Node Status?
node history
Node Type: note [id://1131261]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2018-01-20 01:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (226 votes). Check out past polls.

    Notices?