This is the default behaviour of port.
You have to explicitly pass {line, L} option, but this requires more work to be done, as L is a maximum length of line, so you have to deal with :noeol messages.
It is far easier to apply String.split/3 to split the string by \n






















