note
BazB
<p>
Thanks for all the replies.
</p>
<p>
I must admit, I had overlooked using the template or suffix options that [CPAN://File::Temp] offers by default.
</p>
<p>
I do have calls to [perlfunc:rand|rand] in other parts of the code (and calls to [CPAN://File::Temp] prior to the fork()s), but I was just a little surprised that exactly the same sequences were occurring across so many processes.
</p>
<p>
[dws] suggests that calling [perlfunc:srand|srand] in each child will re-seed the rand function - I'll give that one a shot too, although I did find the warning in the perldoc for 5.6.1 a little concerning:
<blockquote>
Do <i>not</i> call srand multiple times in your program unless you know exactly what you're doing and why you're doing it.
</blockquote>
...and I wasn't completely sure what I was doing :-)<br />
The docs with 5.8.x aren't quite so stern.
</p>
<p>
Cheers,<br><br>
[BazB].
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-127547">
<hr />
<font size=1>
<p align=right>If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.<br>
That way everyone learns.</p>
</font>
</div></div>
369992
369992