Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: uninitialized value in modulus (%)

by ichimunki (Priest)
on Aug 19, 2002 at 14:14 UTC ( #191179=note: print w/replies, xml ) Need Help??

in reply to uninitialized value in modulus (%)

Are you sure that %alphabet contains data? None of the code above shows us how data gets in there... and if data gets in there for likely values of $s.

Is it issuing this warning multiple times for the same run? Otherwise: you get an error the first time through because you never set $alphabet{$s} to anything for its first use, but at the end of your sub, you ++ it, which means that thereafter it has a valid value (i.e. has been "initialized").

Replies are listed 'Best First'.
Re: Re: uninitialized value in modulus (%)
by alexiskb (Acolyte) on Aug 19, 2002 at 14:58 UTC
    Yes, multiple times... I thought i had initialized it by saying: my alphabet; and then it would populate itself automatically...? thank you!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://191179]
[1nickt]: I am sure I don't know about most of the stuff that is no longer controlled by humans. I do know that it's past the point of determining consumer pricing and into things that can kill me with blunt force!
[holli]: but is this really a problem 1nickt? Nobody knows how your human taxi drivers brain works either
[holli]: at least for cars, if the ai works better than a human on average, by all means let the machines drive

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-11-21 13:10 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (301 votes). Check out past polls.