#!perl -w
@nums = 100000 .. 999999; # Generate all the possible numbers
## Shuffle them (use a better rand if needed)
$_ ne ($a=int( rand( $#nums-$_+1))+$_) and $nums[$_] ^= $nums[$a] ^= $nums[$_] ^= $nums[$a] for (0..$#nums);
print pop@nums; # pop a new one each time you need it
####
#!perl -w
@nums = 100000 .. 999999; # Generate all the possible numbers
## Shuffle them (use a better rand if needed)
$_ ne ($a=int( rand( $#nums-$_+1))+$_) and $nums[$_] ^= $nums[$a] ^= $nums[$_] ^= $nums[$a] for (0..$#nums);
open OUT, '>randoms' or die $!;
print OUT pack 'I*', @numbs;
close OUT or warn $!;
##
##
....
open RNDNUM, ';
}
truncate RNDNUM, $newlen or die $!;
close RNDNUM or warn $!;
.....
# do whatever with $rndnum