pc2 has asked for the wisdom of the Perl Monks concerning the following question:
notice that every word here exists. we already have the algorithm to do all that, but here is the doubt: how can we combine the items of the newly generated array in order to form the string "cowboycatdog" again? for example:cow cowboy boy cat do dog
would be the possible segmentations of this string, based on that array. the segmentation "cow-boy-cat-do-g", for example, wouldn't exist, because there is no word "g" in the array. (this is just a small example: the string and the fragments meaning anything could be much bigger). does anyone have any idea on how to to this? thank you in advance.cow-boy-cat-dog cowboy-cat-dog
|
|---|