From owner-freebsd-questions Thu Nov 22 19:26:40 2001 Delivered-To: freebsd-questions@freebsd.org Received: from topaz.mdcc.cx (topaz.mdcc.cx [212.204.230.141]) by hub.freebsd.org (Postfix) with ESMTP id 2DD7637B405 for ; Thu, 22 Nov 2001 19:26:38 -0800 (PST) Received: from k7.mavetju.org (topaz.mdcc.cx [212.204.230.141]) by topaz.mdcc.cx (Postfix) with ESMTP id 0BE452B775; Fri, 23 Nov 2001 04:26:34 +0100 (CET) Received: by k7.mavetju.org (Postfix, from userid 1001) id 07F1C3A1; Fri, 23 Nov 2001 14:26:16 +1100 (EST) Date: Fri, 23 Nov 2001 14:26:16 +1100 From: Edwin Groothuis To: Andre` Niel Cameron Cc: free bsd , cgi-list@jann.com, beginners-cgi@perl.org Subject: Re: Quick question Message-ID: <20011123142616.D58388@k7.mavetju.org> Mail-Followup-To: Edwin Groothuis , Andre` Niel Cameron , free bsd , cgi-list@jann.com, beginners-cgi@perl.org References: <034601c173cb$8edfee00$a50410ac@olmct.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <034601c173cb$8edfee00$a50410ac@olmct.net>; from AndreC@Axxs.net on Thu, Nov 22, 2001 at 10:04:24PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Nov 22, 2001 at 10:04:24PM -0500, Andre` Niel Cameron wrote: > Anyone know how to get a whole random number in perl? > > rand(18) always gives decimals I need just like 12 or 7 anyone know? Multiply it by the maximum number you want, for example if you want something between [1,20] you do int(rand()*20 + 1) Edwin, wondering if you couldn't have sent it to just one mailing-list. -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Interested in MUDs? Visit Fatal Dimensions: ------------------+ http://www.FatalDimensions.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message