start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: sqrt Chapter 5
Function Reference
Next: Reference: stat
 

srand

srand 
expr

Sets the random number seed for the rand operator so that rand can produce a different sequence each time you run your program. If expr is omitted, a default seed is used that is a mix of difficult-to-predict, system-dependent values. If you call rand and you haven't called srand yet, rand calls srand with the default seed.


Previous: Reference: sqrt Perl in a Nutshell Next: Reference: stat
Reference: sqrt Book Index Reference: stat

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.