In reply to Shubhabrata:
In reply to jianfeng.he:
Actually, in our code most of the time, we deal with positive integers.
$random might get you a negative number. But $urandom won’t because it’s unsigned.
That’s why we prefer $urandom.
This is really a difference between $random and $urandom, but I guess there are some other differences in random-stability, I did a little test and found that $random did not affect the random results of subsequent codes, I want to know why, thanks!