Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 pondering the Monastery: (10)
As of 2014-12-19 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (77 votes), past polls