I used new
instead of csv
because it gives you more control over what you can do. Here, no headers are defined at all, which means the row is split into an array reference $row
. The second part of the row is processed by the very same module, as you recognised, to split the string on semicolons—if I understand your comment correctly, you'd need to do that for each column with the + in the general case. The output structure is being built on line 31, where the first part of the line is used as the key, and the result of the secondary processing is used as the value.