in reply to Re^2: Replace first blank line in a text file with headers.
in thread Replace first blank line in a text file with headers.

Too true.

  • Comment on Re^3: Replace first blank line in a text file with headers.

Replies are listed 'Best First'.
Re^4: Replace first blank line in a text file with headers.
by rementis (Beadle) on Mar 24, 2016 at 21:22 UTC
    Should be pretty easy. Just open a new output file, print your header to it. Then cycle through your input file, skipping all blank lines. Then close your output file.