in reply to Re: Match into list?
in thread Match into list?
The output is#!/usr/bin/perl -w use strict; my $line = '76.172.202.159 - - [31/Aug/2007:15:58:15 -0600] "GET / HTT +P/1.1" 200 29692 "http://www.paperbackswap.com/forum/view_topic.php?t +=70235&ls=" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8 +.0.12) Gecko/20070508 Firefox/1.5.0.12"'; my ($host,$date,$url_with_method,$status,$size,$referrer,$agent) = $li +ne =~ m/^(\S+) - - \[(\S+ \+\d{4})\] "(\S+ \S+ [^"]+)" (\d{3}) (\d+|-) " +(.*?)" "([^"]+)"$/; print "$host\n$date\n$url_with_method\n$status\n$size\n$referrer\n$age +nt\n";
Use of uninitialized value in concatenation (.) or string at test.pl l +ine 6. Use of uninitialized value in concatenation (.) or string at test.pl l +ine 6. Use of uninitialized value in concatenation (.) or string at test.pl l +ine 6. Use of uninitialized value in concatenation (.) or string at test.pl l +ine 6. Use of uninitialized value in concatenation (.) or string at test.pl l +ine 6. Use of uninitialized value in concatenation (.) or string at test.pl l +ine 6. Use of uninitialized value in concatenation (.) or string at test.pl l +ine 6.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Match into list?
by ysth (Canon) on Sep 04, 2007 at 00:37 UTC |