On Wed, 12 Mar 2003, Brett W. McCoy wrote: > You're not capturing the correct string. Here's a code snippet I just > tried on an Apache log that worked (assuming you have an open file > handle): > > while(<LOG>) { > print "$1\n" if m|HTTP.*\s+(\d{3})|g'; > } > > $1 contains the matched string inside the parens (\d{3}).
Dang it, when I cut and pasted, a rogue ' got into the code somehow. That final ' on the regular expression should not be there. -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ You are not a fool just because you have done something foolish -- only if the folly of it escapes you. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]