Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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?

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 musing on the Monastery: (8)
As of 2015-10-09 14:30 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (242 votes), past polls