No, not really. I often need to massage text, not only for work related issues, but sometimes for pleasure too, that is, to solve word games or at least to find a clue. Having heard elsewhere about perl superb capacities to deal with text stuff, I began involved with this language in mid-2001. Since then I have read what I could in my free time, but unfortunately it seems not enough yet.
In case you are wondering, my posted question were related to a word game (in Spanish): reorder all the letters of the names of the days and find four words (or less, unlikely).
At first I tried to find out how many words match those criteria, so I began to filter a 100,000 word list, excluding words with unwanted letters, and words with less than 7 letters, but when I tried to filter words with more than the required amount of letters (that is, words with more than 3 a's, etc.) I was unable to code a working solution. So I asked for help.
After running a solution provided by wog, I still have in the output file almost 33,000 words, so I must think on more filters to apply. And no, I won't even try myself to solve all the problem with perl, since as you surely have already guessed my current perl skills are way behind it.
If you like to post some suggestions or other advises, I will be very pleased to read them.
Thank you.
Best regards,
Richard
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.