[ILUG] Newbie Perl Question

From: Declan Grady (Declan.Grady at domain nuvotem.com)
Date: Thu 04 Oct 2001 - 11:30:22 IST


I have a 40 meg remote http access log file that I want to pull some info
out of.
I am trying to match all lines that have the text "/en/" in them, to pick
out files accessed from that folder.

can i match this by using /\/en\// ? or am i misunderstanding the
effect of the \ character ?

I am using the command :

perl -e 'open(I,"/logs/2001.log");while(<I>){print $_ if($_=~/\/en\//);}'
>/tmp/en.log

.... which some kind ilug'er suggested a while back, only using
/text_to_match/
in place of the /\/en\//

Thanks,
Declan
[NODIS]



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:12:30 GMT