Gossamer Forum
Home : General : Perl Programming :

Similar keys in hash

Quote Reply
Similar keys in hash
I need to filter a hash. Say I have these keys:
XXX YYYY ZZ
XXX YYYY
YYYY ZZ
XXX ZZ

I need to keep the longest one - "XXX YYYY ZZ" and throw out the second and the third one (order of the words matter). What would be the best way to do this?
Thanks
Subject Author Views Date
Thread Similar keys in hash AlexBGD 3883 Aug 7, 2004, 3:21 PM
Post Re: [AlexBGD] Similar keys in hash
Crolguvar 3666 Aug 26, 2004, 9:33 AM