Date: Fri, 23 Nov 2001 14:26:16 +1100 From: Edwin Groothuis <edwin@mavetju.org> To: Andre` Niel Cameron <AndreC@Axxs.net> Cc: free bsd <freebsd-questions@FreeBSD.ORG>, cgi-list@jann.com, beginners-cgi@perl.org Subject: Re: Quick question Message-ID: <20011123142616.D58388@k7.mavetju.org> In-Reply-To: <034601c173cb$8edfee00$a50410ac@olmct.net>; from AndreC@Axxs.net on Thu, Nov 22, 2001 at 10:04:24PM -0500 References: <034601c173cb$8edfee00$a50410ac@olmct.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011123142616.D58388>