in reply to Predictable random sequence

srand will give you a predictable sequence of error numbers for each version+compiler+platform of Perl. It does not guarantee cross-platform identity. For example on Windows, the (current) random number generator only has 15 bits of entropy, so numbers on Windows aren't that random.

Replies are listed 'Best First'.
Re^2: Predictable random sequence
by vsespb (Chaplain) on Sep 17, 2013 at 13:41 UTC
    Thanks. That's sad. So I still searching for another approach then.

      Depending on your needs, you might get away by not using Perls random number generator and instead using Math::Random::MT - this would give you more randomness on Windows too, and maybe even predictability across more parameters.

      Personally, I would aim for centralizing the generation of such number sequences and passing either the generator or the number(s) around as parameters. That way, you can better control what number gets used where.