You describe replacing only the first comma, but then expect exactly the opposite: "ABC,XYZ PERL IS AWESOME INNIT". It seems you want to remove all commas except for the first.
Try this. It "looks behind" for a comma, without consuming it; then matches (and stores) up to a comma; then replaces; and repeats.
s/(?<=,)([^,]*),/\1/g;
In reply to Re: Replace only selected characters
by hbm
in thread Replace only selected characters
by rohanan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |