Scalar::Random - Create automatic random number generators


Scalar-Random documentation Contained in the Scalar-Random distribution.

Index


Code Index:

NAME

Top

Scalar::Random - Create automatic random number generators

SYNOPSIS

Top

  use Scalar::Random 'randomize';

  my $random;
  my $MAX_RANDOM = 100;

  randomize( $random, $MAX_RANDOM );

  print $random, "\n"; # '42'
  print $random, "\n"; # '17'
  print $random, "\n"; # '88'
  print $random, "\n"; # '4'
  print $random, "\n"; # '50'

DESCRIPTION

Top

Scalar::Random will turn a scalar variable into an automatic random number generator. All you need to do to get the next random number is use it!

AUTHOR

Top

Alfie John, <alfie@h4c.kr>

COPYRIGHT AND LICENSE

Top


Scalar-Random documentation Contained in the Scalar-Random distribution.

package Scalar::Random;

use 5.010000;
use strict;
use warnings;

require Exporter;

our @ISA = qw(Exporter);

our @EXPORT = qw(
	randomize
);

our $VERSION = '0.02';

require XSLoader;
XSLoader::load('Scalar::Random', $VERSION);

1;
__END__