in reply to Re: retain longest multi words units from hash
in thread retain longest multi words units from hash

Another hint - sort the keys in order of ascending length, so you have all the short words ready for deletion in the hash when the longer words get examined.

  • Comment on Re^2: retain longest multi words units from hash

Replies are listed 'Best First'.
Re^3: retain longest multi words units from hash
by LanX (Saint) on Jul 28, 2018 at 11:48 UTC
    The other way round, yes. (delete short words)

    But it's more complicated, he want's to delete 2 word groups if they are contained in a 2+n word group.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice