Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 (Monsignor)
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 contemplating the Monastery: (7)
As of 2018-07-20 20:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (441 votes). Check out past polls.

    Notices?