[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-web
Subject: Re: Cant get rand to work on asp
From: "$Bill Luebkert" <dbe () wgn ! net>
Date: 2003-02-13 23:53:35
[Download RAW message or body]
Eric Robertson wrote:
>>$Bill Luebkert wrote:
>>Your orig code should have been fine - try:
>>
>>for (1 .. 10) {
>> my $Temp = int rand (1 + 12 - 1);
>> print $Temp, "\n";
>>}
>>
>>and see what you get.
>
>
> Bill
>
> Since Justin wanted a number between 1 and 12 shouldn't it have been:
>
> for (1 .. 10) {
> my $Temp = int rand (11) + 1;
> print $Temp, "\n";
> }
I wasn't really looking at the rand value since that didn't seem to be
his problem - I just left it the way he had it.
If that's the range he wanted, then it should be:
my $Temp = int rand (12) + 1;
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / ) // // DBE Collectibles Mailto:dbe@todbe.com
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic