in reply to Gender prediction

While the task sounds odd and has undesirable social implications (IMHO), from a technical perspective, you should be able to do it.

The index function should take you most of the way, assuming you're looking for exact matches of names. Since you won't know about case, you'll probably want to lc everything before you do the comparison.

If you are concerned about efficency, sort all of your baby name and email information first so you can short circuit when you hit something alphabetically larger.

perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'