in reply to Re: retain longest multi words units from hash
in thread retain longest multi words units from hash
What would be the average length of $word for 1 million entries? 10 MB?
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
==== Update
you can improve preformance if you sort by number of whitespaces first and only add to $word in chunks of strings with the same number of whitespaces.
There is no point searching in an n word string being included in another n-word string.
Particularly you can stop searching once you reached the one word strings.
|
|---|