A typical random number generator will generate the same sequence of numbers with the same initial state. It can be a blessing or a curse. Be sure to seed your random number generator when you want individual runs to be different. I typically use time for that.
Except with ancient Perl (5.004), calling srand() yourself is not necessary. rand() will call srand() on the first call to rand(). The seed value used is a function of time, PID and memory allocation so typically what rand()will do itself is better than what calling srand() yourself would do. srand rand
Basically to get the same set of random numbers for a new run you have to keep specifying the same seed in an explicit call to srand() at the start of the run. I do that when I am debugging and want to get the same numbers so that some error case is reliably repeatable.
In reply to Re^4: Get CID inline attachments with MIME::Parser
by Marshall
in thread Get CID inline attachments with MIME::Parser
by sebastiannielsen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |