added the indexing Perl code
Merge pull request #8 from markwilkinson/master

added the indexing Perl code