|Syntactic Confectionery Delight|
Unwrapping the Dictionaryby hacker (Priest)
|on Aug 21, 2007 at 03:08 UTC||Need Help??|
hacker has asked for the
wisdom of the Perl Monks concerning the following question:
I've got a small project brewing and have been adding features over the last 1.5 weeks. The most-recent feature I've added is a dict.org lookup for each word in my taxonomy.
The code looks like this (and works great):
This returns a definition that looks like the following:
These words are automagically wrapped in the response that comes back from dict.org, and that presentation isn't exactly ideal for my needs. I tried the various ::Wrap and unwrap modules, and none seem to do the job that I need.
In the above case, I'm trying to get the result that looks like (PM will wrap this somewhat, but what I'm trying to do is keep each numbered item on its own line, unwrapping each \d\..*, essentially):
Can others suggest a better way of doing what I'm trying to do?