Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

(dkubb) Re: (1) Detecting duplicate keywords passed in a form

by dkubb (Deacon)
on Mar 22, 2003 at 10:19 UTC ( #245119=note: print w/replies, xml ) Need Help??


in reply to Detecting duplicate keywords passed in a form

Remove the duplicate words in a list and preserve the original order of the words:

my %seen; my @keywords = grep ! $seen{lc()}++, qw(this that other foo THIS bar +);

Dan Kubb, Perl Programmer

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-08-18 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?