I recently investigated the topic of random name generators, and tried to understand what made the Elite name generator "tick". And I think I've found a way. (From a blog post of mine.)
Code:
my $digraphs = "..lexegezacebisousesarmaindire.aeratenberalavetiedorquanteisrion";
my $max = length($digraphs);
sub name {
my $length = 5 + rand(5); # 4-8
my $name = '';
while (length($name) < $length) {
$name .= substr($digraphs, 2*int(rand($max/2)), 2);
}
$name =~ s/\.//g;
return $name;
}
for my $n (0..100) {
printf "%3d. %s\n", $n, name();
}
Want a different "sound" for your subsector? Here's an example I tried:
Code:
my $digraphs = "fafemalunabararerixevivoine.n.q.pazizozutatetitotu..";
More variation in name length?
Code:
my $length = 4 + rand(7); # 4-8
Cheers
Alex