in reply to Efficient log parsing?
"If you don't want the position reset after failure to match, add the //c, as in /regexp/gc."So your code should read:
while (@x = /($regex)/gc) { push @buffer, [ @x ]; # Or, if you localize (my) @x, push @buffer, +\@x ; }
"As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Efficient log parsing?
by zrajm (Beadle) on Dec 14, 2007 at 07:01 UTC | |
by NetWallah (Canon) on Dec 15, 2007 at 07:05 UTC |