in reply to Record separator question

Bear in mind that when $/ is some particular string, perl reads input data up to and including that string (or until EOF, if the string does not occur). The record separator, whatever it is, is retained as the last component of the record just read in. Note also that "chomp" works be removing $/ from the end of a string (if the string happens to contain $/ at the end).

Given that records in your file begin with the line "====header info====\n", you could set this whole string as your record separator, and just accept the fact that the first "record" you read in will contain nothing else but this line, and that all subsequent records will have this line as the end of the record string, not the beginning.

Something like the following would do what you want, assuming that you're okay with actually removing these record separators and keeping just the stuff in between:

$/ = "====header info====\n"; while (<>) { chomp; next unless ( /\S/ ); .... }
(I tried this out on your sample text, and it did the right thing, even with the last record, which did not have "====header info====" at the end.)