in reply to Hash element exists/delete
if ($hash{lc $keys} = $hash{$z}) You are using "=" Assignment Operator ?
Update:use strict; use warnings; use Data::Dumper; my %final=(); my %hash =( 1=>'the', 2=>'The', 3=>'word', 4=>"Word",5=>'ree',6=>"REE" +); foreach my $keys(keys %hash) { foreach my $keys1(keys %hash) { if(lc($hash{$keys}) eq $hash{$keys1}) { $final{lc($hash{$keys})}++; } } } print Dumper \%final;
Is that Useful? Done in your way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash element exists/delete
by tmharish (Friar) on Jan 22, 2013 at 08:54 UTC |