in reply to replacing one or more newlines with commas

A non-regex option:
#!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
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.

"Argument is futile - you will be ignorralated!"