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:[EMAIL PROTECTED]
  / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/


_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to