Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Detecting duplicate keywords passed in a form

by dakkar (Hermit)
on Mar 21, 2003 at 15:01 UTC ( #244885=note: print w/replies, xml ) Need Help??


in reply to Detecting duplicate keywords passed in a form

@keywords{map lc,@keywords}=(); @keywords = keys %keywords;

This maps all keywords to lowercase, puts them as keys to a hash (I believe this to be the fastest and most compact way), then extracts them again.

Note that you would lose the order of the keywords.

-- 
        dakkar - Mobilis in mobile

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://244885]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2022-05-22 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?