in reply to Randomizing Unique ID?
(Thanks Tye for looking over my shoulder and helping construct that simple algorithm)# For a positive $number my @nums = (0..9,'a'..'z','A'..'Z'); my $base = @nums; my $rep = ""; # this will be the end value. while( $number > 0 ) { $rep = $nums[$number % $base] . $rep; $number = int( $number / $base ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Randomizing Unique ID?
by tye (Sage) on Aug 09, 2000 at 21:54 UTC | |
by Adam (Vicar) on Aug 09, 2000 at 22:03 UTC | |
|
RE: RE: Randomizing Unique ID?
by turnstep (Parson) on Aug 10, 2000 at 00:00 UTC | |
by tye (Sage) on Aug 10, 2000 at 00:51 UTC | |
by turnstep (Parson) on Aug 10, 2000 at 16:28 UTC | |
by tye (Sage) on Aug 10, 2000 at 17:33 UTC | |
by Adam (Vicar) on Aug 10, 2000 at 00:11 UTC |