Just for kicks here is a perl6 version that uses case...looks much like perl5 so i made it a function.
use v6; # response to 474872 (remove duplicates regardless of case) sub remove_dups (@array is copy) { my %unique; %unique{uc($_)} = 1 for @array; return %unique.keys; } my @array = ('Hello','hello'); remove_dups(@array).say; @array.say;
In reply to Re: (almost) Unique elements of an array
by eric256
in thread (almost) Unique elements of an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |