Perl for Web Site Management
December 4, 2001
|
Learn to do everyday tasks on your Web site using Perl--even if
you have no programming background. Perl for Web Site
Management shows how to write CGI scripts, incorporate search
engines, convert multiple text files to HTML, monitor log files,
and track visitors to your site. Whether you're a developer, a
designer, or simply a dabbler on the Web, this is the hands-on
introduction to Perl you've been waiting for. This is an excerpt
from Chapter 8: "Parsing Web Access Logs"
|
Checking links, batch editing HTML files, tracking users, and
writing CGI scripts--these are the often tedious daily tasks that
can be done much more easily with Perl, the scripting language
that runs on almost all computing platforms. If you're more
interested in streamlining your web activities than in learning a
new programming language, Perl for Web Site Management is for
you: it's not so much about learning Perl as it is about using
Perl to do common web chores more efficiently.
The secret is that, although becoming a Perl expert may be hard,
most Perl scripts are relatively simple. Using Perl and other
open source tools, you'll learn how to:
- Incorporate a simple search engine
- Write a simple CGI gateway
- Convert multiple text files into HTML
- Monitor log files
- Track users as they navigate your site
Even if you don't have any programming background, this book will
get you quickly past Perl's seemingly forbidding barrier of chops
and chomps, execs and elsifs. You'll be able to put an end to
using clunky tools, editing files tediously by hand, or relying
on programmers and system administrators to do "the hard stuff"
for you. Sure, you might learn a little bit about programming as
well, and perhaps something about the role of open source tools
on the Web. But the purpose of Perl for Web Site Management isn't
to educate you--it's to empower you. Whether you're a developer,
a designer, or simply a dabbler on the Web, this book is the
plain-English, hands-on introduction to Perl you've been waiting
for.
Chapter 8
- Part One
- Parsing Web Access Logs
- Converting IP Addresses
- Part Two
- The Log-Analysis Script
- Different Log File Formats
- Part Three
- Storing the Data
- The "Visit" Data Structure
- The &store_line Subroutine
Parsing Web Access Logs
|