my @counts = map { length } $string =~ /1(?=(.*))/g;