in reply to string manipulation

my $answer = join ", ", map { length $_ } $string =~ /(0+)/g;

  1. $string =~ /(0+)/g searches for occurances of 0's in your string and returns an array of them
  2. map { length $_ } ... transforms the array of strings into an array of their lengths (i.e. counts of zeroes)
  3. Finally, join ", " ... makes a string from this array.
More info: perlretut, map, join.

Edit: and I was a bit late :)