Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: error asking pakage namewhile using hashes

by boftx (Chaplain)
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 having an uproarious good time at the Monastery: (5)
As of 2014-08-01 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (0 votes), past polls