in reply to error asking pakage namewhile using hashes
Well, assuming you have a use strict; that you did not include in the code sample then %count is not being explicitly defined. You are declaring $count, but you are using it as a hash, $count{$word}. Change $count to %count and it should be okay.
my(@words, %count, $word);
Update: added explicit example of where to make the change.
|
|---|