Strategies to handle a file with multiple fixed formats

后端 未结 6 852
北海茫月
北海茫月 2021-01-12 22:40

This question is not Perl-specific, (although the unpack function will most probably figure into my implementation).

I have to deal with files where multipl

6条回答
  •  醉梦人生
    2021-01-12 23:08

    I would keep an additional state in one or more variables and update it per row. Then you e. g. know if the last line was level 1, or if the last row was format 4 (and you can expect format 5), thus giving more security to your processing.

提交回复
热议问题