I based my code on japhy
's solutions, none of which were stripping newlines, probably because Rhodium
didn't specify if he wanted them removed, or the lines to be simply concatenated as-is into single list items.
$lines[ @lines + 1 - s -^\053|\012--g ] .= $_ while <DATA>;
This fails by adding an undef
element to the array if a newline is not the final character in the file. Changing my original easy enough though, without any regex or substr nastiness:
chomp, $lines[@lines - s/^\+//] .= $_ while <DATA>;
s aamecha.s a..a\u$&owag.print