That's nice, but it goes through the factorial of $ones+$zeroes, 5!=120.. 120 != 10.
i'm working with strings of 435 zeroes and 343 ones (for instance), where i'm in dought i'll live that long to see it finish.
i need this sub{} to play with the strings that contain that number of 1's and 0's, not the numbers that contain them.