in reply to Detecting duplicate keywords passed in a form
Use the uniqueness property of a hash to filter duplicates.
my @keywords = keys %{{ map { lc, undef } qw(this that other foo this bar)}} ;Updated I changed $_ => undef to lc, undef to be correctly case-insensitive
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Detecting duplicate keywords passed in a form
by flounder99 (Friar) on Mar 21, 2003 at 16:36 UTC |
In Section
Seekers of Perl Wisdom