Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2016-10-28 15:30 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (386 votes). Check out past polls.