in reply to Question: Generate unique/random 12-digit keys for 25,000K records, howto??

If your goal is to create unguessable unique keys and you don't care about leaking info about the order in which the key are created, you could concatenate a unique incrementing number with a random number.
my $unique = time; my $key_bin = pack('N', $unique) . pack('C*', map { int(rand()*256) } 1..6); my $key_hex = unpack('H*', $key_bin);
That gives something like
4818e14c1662fd0dac98 \______/\__________/ | | 32-bit 48-bit unique random

You can reduce the size of the unique portion (by using substr(pack('N', $unique), 1)) and change the size of the random portion (by changing the "6") at will.