in reply to Need help with regex to replace 4th \s with \n in data line
This looks like a Text::Wrap job.