Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by dkubb (Deacon)
on Mar 22, 2003 at 10:19 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-28 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found