Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: error asking pakage namewhile using hashes

by boftx (Deacon)
on Oct 06, 2013 at 05:30 UTC ( #1057119=note: print w/ replies, xml ) Need Help??


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.

On time, cheap, compliant with final specs. Pick two.


Comment on Re: error asking pakage namewhile using hashes
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1057119]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2015-07-31 03:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls