if ($charCount{$char}){ $charCount{$char}++; }else { $charCount{$char}=1; }