my @array = qw/THIS this there THERE prasanna/; %temp = (); map{$temp{lc($_)}++}@array; for (sort keys %temp) { print "$_=>$temp{$_}"."\n"; }