In Perl, how can I test for all possible combinations in a number.
For example, the combination I am interested in is separating.
E.g: 53 could be “5 3” or just “53”
E.g: 215 could be “21 5” or “2 15”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In fact, you are distributing spaces to all the positions between characters. On each position, the space either is realized or not for each combination. Therefore, you can represent it as a binary number, 1 means space present, 0 means space not present.