We don't bite newbies here... much | |
PerlMonks |
Re^2: Extract Block Of Text From Logby LanX (Saint) |
on Nov 21, 2018 at 12:22 UTC ( [id://1226126]=note: print w/replies, xml ) | Need Help?? |
> Well, i'd use a classic state machine for this problem, then we can work line-by-line, without having to load the whole file into memory. Sorry for nitpicking, but ... :) Flip/Flop solutions are state machines and do it in one pass. I even demonstrated that you can safely nest them, hence the technology is "scalable". The advantage of your solution is that it's easily portable to other languages, i.o.W. it ignores Perl's possibilities. ;-)
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|