"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
In reply to Re: Efficient log parsing?
by NetWallah
in thread Efficient log parsing?
by zrajm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |