rlm@27: #!/usr/bin/perl rlm@27: rlm@27: use Tie::File; rlm@27: rlm@27: rlm@27: tie @last, 'Tie::File', "./dist.all.last" or die; rlm@27: rlm@27: tie @first, 'Tie::File', "/home/r/proj/aurellem/html/dist.all.first" or die; rlm@27: rlm@27: $num_first = 5494; rlm@27: $num_last = 88799; rlm@27: rlm@27: print "Content-Type: text/plain", "\n\n"; rlm@27: print "Random Name generator from US Census data.\n". rlm@27: "Press refresh(F5) to generate more names.\n\n"; rlm@27: rlm@27: rlm@27: rlm@27: sub print_rand_name { rlm@27: print $first[int(rand($num_first))]." ". rlm@27: $first[int(rand($num_first))]." ". rlm@27: $last[int(rand($num_last))]."\n"; rlm@27: } rlm@27: rlm@27: rlm@27: &print_rand_name(); rlm@27: &print_rand_name(); rlm@27: &print_rand_name(); rlm@27: &print_rand_name(); rlm@27: &print_rand_name(); rlm@27: rlm@27: rlm@27: rlm@27: rlm@27: