in reply to header footer

Hmm, I have the feeling that there are some misunderstandings here. It seems that there are several headers and several footers, not just one of each in the file. Possibly even one header and one footer for each record. It is also not entirely clear whether the headers and footers are on the same line at the data. Can you please give a sample of your file so that we can understand better its structure?

Replies are listed 'Best First'.
Re^2: header footer
by Eily (Monsignor) on Mar 04, 2014 at 22:46 UTC

    Oups, indeed.

    Well then maybe setting the input file separator ($/) to "HDR" would work then.

    Or s/HDR.{47}|FTR.{27}//g;, but it doesn't appeal much to me.