Generating sample first names

I had a need to write a script that would give me a random first name.  I grabbed the top 200 first names for baby boys in the US from 2000-2009, and the same list for baby girls:

Boys Girls
Jacob Emily
Michael Madison
... ...

My initial implementation just printed out the name, but I quickly realized I needed to print out the gender if I wanted to talk about what the (fictitious) person did.  So I updated it to print out the gender as well.

In the course of this I realized that some names appeared on both lists.  In particular they are:

  • Alexis
  • Angel
  • Jordan
  • Peyton
  • Riley

The script is called like this:

>perl -w
Wesley (male)

EDIT 2015-10-31: moved source to

Comments (0)

Skip to main content