in reply to Regex to replace consecutive tokens

If all values are alphanumeric, you can use this:
$s =~ s/,\B/,0/g;

Update. Here's a rx that handles leading and trailing commas, empty strings:

$s =~ s/(^|,)\K(?![^,])/0/g;