I want to search for commas that are together, and replace with one.

For example "one,two,,three,,," should then be "one,two,three"

this is the code I came up with.

Why is it wrong??

$SQL =~ s/[,+]/,/gs; #correct errors.