in reply to replacing one or more newlines with commas
It does seem a bit strange to create a new string just with a different delimiter purely so you can split it again. I agree with myocom above - you can split the list straight into an array.#!perl -w use strict; undef $/; my $csv = join(',',split(/\n+/,<DATA>)); print $csv; my @values = split(/,/,$csv); # hmmm, we had this a couple of lines ba +ck __DATA__ 1 2 3 4 5 6
"Argument is futile - you will be ignorralated!"
|
|---|