|
|
| The stupid question is the question not asked | |
| PerlMonks |
Re^2: Efficient selective substitution on list of wordsby Polyglot (Monk) |
| on Jan 31, 2010 at 13:56 UTC ( #820578=note: print w/ replies, xml ) | Need Help?? |
|
I really do appreciate your suggestions, and while it may be more detailed overall, the charm of tye's solution was that he basically prepared the entire substitution list in a single line of code, using map, sort, and join with some interesting syntax and I was wanting to learn how it worked for the beauty of learning as much as for the joy of having a working solution. In the sort process, I remember he ordered the words by length so that the substitutions would start with the longest words and work down to the shorter ones. This would avoid several potential problems with overlapping terms in the exchange list, and is almost a necessity, I think, to proper function here. Blessings, ~Polyglot~
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||