Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Perl Programming/Keywords/srand

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Perl sqrt stat Keywords The srand keyword The srand function sets and returns the random number seed for the rand operator so that it can produce a different sequence of random numbers. srand is called implicitly when rand is called, but can be called explicitly to generate random numbers for test purposes with the same seed (see below). Please do not call srand by the same more than once without an EXPRESSION after it, as the random number generation will lose randomness. Syntax srand EXPRESSION srand Examples srand($seed); # Creates random numbers with the same seed for test See also rand Perl sqrt stat Keywords