in reply to (almost) Unique elements of an array
my @array = qw/THIS this there THERE prasanna/; %temp = (); map{$temp{lc($_)}++}@array; for (sort keys %temp) { print "$_=>$temp{$_}"."\n"; } [download]