Frank Schönmann: srand Zufallsgenerator

Beitrag lesen

hi!

warum krieg ich immer die gleichen zahlen beim aufruf von:

Wer lesen kann ist klar im Vorteil:

perldoc -f srand
=== cut ===

Do *not* call srand' multiple times in your program unless you        know exactly what you're doing and why you're doing it. The        point of the function is to "seed" the rand' function so that
       rand' can produce a different sequence each time you run your        program. Just do it once at the top of your program, or you        \*won't\* get random numbers out of rand'!

=== cut ===

bye, Frank!