in reply to Regular Expression Help

If your data is exactly have it there then:

local $/ = ''; + while (<DATA>) { chomp; + my( $group, $number, $members) = split /,/,$_,3; + @members = ($members =~ /(CN=[^,]+)/mg); + $members = '"' . join( ',', @members) . '"'; + print "$group,$number,$members\n"; + } __DATA__ ...
will work fine. Of course if the data changes format in the slightest it will probably break

PS Please do not keep posting new threads when you have a followup to a previously posted question.

/J\