I'm trying to take three pieces of information from a common log format log file. An entry of the log file would be:
65.54.188.137 - - [03/Oct/2007:02:20:22 -0400] "GET /~longa/statistics/code/xlispstat/smoothers/spline/ HTTP/2.0" 301 2633
and from that, I want to store the number of occurrences of the IP, the URLs, and the status codes in a hash. I figured they each have to be in their own. Any help would be appreciated, even if you can just point me in the right direction.
You can read the information from the log entries with a regular expression. Something like this:
Then you can put this information into a hash and process it how you like.