Freudian Script
By Kent Tegels
Can one script change the way you think about developing? In the 15 years or so I've been programming, there have been a few cases where the investment in learning a new tool has paid huge and immediate benefits. One such case involved learning how to use Perl to analyze Web server log filessomething that most developers take for granted. But careful and frequent analysis produces unexpected results. The site developer may rightly expect that certain pages are popular, only to find that other content is getting used and reused more. By analyzing the logs, you'll know how your site is being used.
Perl has long been one of the tools of choice for scripting CGI programs. On the Microsoft platform, the simplicity of Active Server Pages (ASP)traditionally written in Visual Basic Scripting Edition (VBScript)seems to fulfill the same role. But Perl and VBScript have very different strengths and weaknesses. Wouldn't it be great if you could use Perl and ASP together? In this article, I'll provide you with some practical examples of Perl's versatility. For an extended introduction to PerlScript, read Shelley Powers' feature article, "PerlScript: a Hot Ingredient for ASP," in this issue.
Log-File Analysis
Rather than writing endlessly about theory, let's look at a practical application of Perl in the ASP environment. It's common to analyze the information kept in the server log files, which is generated when visitors use your Web site. While there are several great tools for evaluating these logs, they may offer only some of the information you want.