🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.perl
Article #3

Re: Anfängerfrage: wieso liefert rand() auch ohne srand() bei jedem Durchlauf unterschiedliche Werte?

#3
From: Stefan Ram
Date: Sat, 24 Oct 2026 09:37
10 lines
1850 bytes
=?UTF-8?Q?J=C3=B6rg_=22Yadgar=22_Bleimann?= <yazdegird@gmx.de> schrieb oder zitierte:
>                         Wird ohne srand() bei Verwendung von rand() 
>srand() implizit verwendet?

$ perldoc -f rand
. . .
Automatically calls "srand" unless "srand" has already been called.
. . .

Technical Details
Message-ID: <rand-20261024103639@ram.dialup.fu-berlin.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!not-for-mail
References: <11bh7r5$859k$1@solani.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: de.comp.lang.perl
Subject: Re: Anfängerfrage: wieso liefert rand() auch ohne srand() bei jedem Durchlauf unterschiedliche Werte?
Date: 24 Oct 2026 09:37:39 GMT
Organization: Stefan Ram
Lines: 10
Expires: 1 Dec 2027 11:59:58 GMT
Message-ID: <rand-20261024103639@ram.dialup.fu-berlin.de>
References: <11bh7r5$859k$1@solani.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Y8WYyUm9tcmXC2b+5rq1Sw2x1n+0vzEXbSmovDulX8d5ps
Cancel-Lock: sha1:zEH8I5o7WPFy3b0z7AXzBOZUPlA= sha256:O5UHKXAoevKkH3dBQYgF7rvx2Kw8d2Bm5IbRsrIjd7w=
X-Copyright: (C) Copyright 2026 Stefan Ram. All rights reserved.
	Distribution through any means other than regular usenet
	channels is forbidden. It is forbidden to publish this
	article in the Web, to change URIs of this article into links,
        and to transfer the body without this notice, but quotations
        of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
	services to mirror the article in the web. But the article may
	be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: de