The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You're almost there. If you intend to read record by record, but then use the flip-flop operator as though it's operating line by line, you'll have to modify your code's flow a little:
But it might be easier to keep the existing "record" file read, and then treat the record as a multi-line string (since it is):
Another strategy could be going back to using the flip-flop operator, but reading your file line by line, though doing so means you'll have to take care to check that you haven't included a record termination line within the truthy state of the flip-flops, as that would indicate that your record ended prematurely or was otherwise poorly formed. Dave In reply to Re: Extract Block Of Text From Log
by davido
|
|