Welcome to the Monastery | |
PerlMonks |
Re: Detecting duplicate keywords passed in a formby diotalevi (Canon) |
on Mar 21, 2003 at 13:12 UTC ( [id://244847]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|