in reply to pl c sv text format wrap

You should almost certainly use Text::CSV to handle the CSV input and output.