$string1 = "ABC,XYZ PERL IS, AWESOME, INNIT"; $string1 =~ s/(,[^,]*),/$1/gi; print "The resulting value is : $string1 \n";