in reply to Split columns according header delimiter
In terms of the question you've asked, the most obvious approach from my perspective would be to use index to find the locations of the + symbol, and then use substr to grab the chunks out of the target row.
Alternatively, you could split on + (split /\+/, $string since + is a regular expression Metacharacters), and then use the
invocation of substr to destructively take chunks of your target row according to the length of each chunk of -s from the header.substr EXPR,OFFSET,LENGTH,REPLACEMENT
Update: Edit of original node makes much of the content above moot.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|