ela wrote:
) "Willem" <> wrote in message
) news:...
)> ela wrote:
)> ) Thanks for correcting this mistake. The pseudocodes should be:
)> )
)> ) while ($line = <FilePointer>) {
)> ) chomp $line;
)> ) $variable = $line;
)> ) $hash{"$variable"}{freq}++;
)> ) if (<some criteria fulfilled>) {
)> ) $hash{"$variable"}{type} = "A";
)> ) } else {
)> ) $hash{"$variable"}{type} = "B";
)> ) }
)> ) }
)>
)> What does it do ? What do you want it to do ? Where does it go wrong ?
)
) I make use of hash variable to take statistics of the frequency of different
) names stored in a file. However, I find some of the names contain special
) characters, for
) example,
)
) Normal
) I have 30% {abc} shares.
)
) Hello! World?
) Who loves $?
)
) So except that "Normal", the others have abnormal counts, e.g.
) I expect there should be a key
, but then I obtain two keys,
) one is
)
,
) and the other is
) abc@yahoo
The code you posted above doesn't do that.
The mistake must be in some code you didn't post.
Please post a complete program that can be run and shows the problem.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT