Help for this page

Select Code to Download


  1. or download this
    use v5.030;
    use PDL;
    ...
        MCE->say(MCE->wid, " ", rand());
      }
    )->run;
    
  2. or download this
    $ perl ex.pl | sort
    1 0.455586975281225
    ...
    2 0.265520439556898
    3 0.0346538807070864
    4 0.803787321857275
    
  3. or download this
    # The PDL module 2.062 ~ 2.089 exports its own srand() function, that
    # silently clobbers Perl's srand function, and does not seed Perl's
    ...
    else {
       $self->{_seed} = int(CORE::rand() * 1e9);
    }
    
  4. or download this
    if ( $INC{'PDL/Primitive.pm'} ) {
       ...
    }
    
  5. or download this
    $self->{_seed} = int(CORE::rand() * 1e9);