in reply to random question

G'day perlaintdead,

"I posted a very simple (and apparently bad) RNG and ..."

A link to that would have been useful. Is Random Number Generator what you're referring to?

Have you read rand and srand? Have you looked at the four CPAN modules that both of those have links to (at the end of their documentation)? Have you looked at the source code of those modules? Have you you followed up on the other advice given previously?

Change

print RandomMutation()."\n" for 0..100;

to

print RandomMutation()."\n" for 0..5;

Add print statements throughout your code to see what's causing the repetition.

-- Ken

Replies are listed 'Best First'.
Re^2: random question
by perlaintdead (Scribe) on Sep 08, 2013 at 08:37 UTC

    Just read through both docs on srand and rand (for the 3rd or 4th time). the only thing i can thing of is multiple implicit calls to srand() but i try'd putting srand($salt) in the first line of the RandomMutation sub to no avail.

Re^2: random question
by perlaintdead (Scribe) on Sep 08, 2013 at 08:30 UTC

    yes that was the one i did before. I looked into the modules and ran into so errors trying to install them (I kind of want to make my own RNG anyways AKA the hard way)