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:

http://www.ssa.gov/OACT/babynames/decades/names2000s.html

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 name.pl
Wesley (male)

EDIT 2015-10-31: moved source to https://github.com/mvaneerde/blog/blob/master/scripts/name.pl

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s