Loading ...
Sorry, an error occurred while loading the content.
 

Re[2]: [PBML] Random Number

Expand Messages
  • Dmitriy Lyalyuev AKA Silver Ghost
    Ave, perl-beginner@yahoogroups.com, morituri te salutant! G #Use the rand() function: G $num = rand(10); G print int($num), n ; G #The 10 represents the
    Message 1 of 2 , Aug 1, 2003
      Ave, perl-beginner@yahoogroups.com, morituri te salutant!

      G> #Use the rand() function:
      G> $num = rand(10);
      G> print int($num), "\n";
      G> #The 10 represents the maximum value of the random number.

      Before need use srand();

      srand($^T);
      $num = rand(10);
      print int($num), "\n";

      --
      01.08.2003, 16:14

      Dmitriy Lyalyuev AKA Silver Ghost
      silver@...
    Your message has been successfully submitted and would be delivered to recipients shortly.