initial commit...more testing needed.
Merge pull request #4 from davidcollins4481/master

Perl implementation