Note that if you want to print out the result as HTML, you'll have to parse the log file. If you're using Apache, there are a few tools which can make this much simpler, such as Log::Parser a.k.a. Apache::ParseLog.#!/usr/bin/perl -w use strict; my $logfile = "/.../access_log"; open(LOG, $logfile) || die "Could not read $logfile\n"; while (<LOG>) { next unless (/\Q$ARGV[0]\E/); print; } close(LOG);
In reply to Re: Matching text in Perl
by tadman
in thread Matching text in Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |