Help for this page
$/ = undef; $_ = <>; s/(\n)(header)/$1.$2/g; # (updated: made sure not to lose \n) s/\n\+/ /g; # (updated: forgot to escape the "+") print;