Fixed substitution in last name sub
First pass at perl/hmd.pl

Mostly based off original hmd.pl ... which worked well most of the time