<?xml version="1.0" encoding="windows-1252"?>
<node id="83987" title="Re: (Golf) mobile phone numbers - words" created="2001-05-29 16:00:53" updated="2005-08-15 13:43:08">
<type id="11">
note</type>
<author id="19952">
the_slycer</author>
<data>
<field name="doctext">
Here's my entry at 113, note that all we pass is the wordlist and the key to search for:
&lt;code&gt;
sub num{
$k=shift;for(@_){chomp;$n=lc;$n=~y/abcdefghijklmnopqrstuvwxyz/22233344455566677778889999/;push@{$h{$n}},$_;$h{$k}
}
&lt;/code&gt;

&lt;b&gt;Update: &lt;/b&gt;  I believe that I can add 5 (score:118) and get all possibilities.
&lt;code&gt;
sub num{
#23456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_12345678
$k=shift;for(@_){$n=$_;chomp;lc;y/abcdefghijklmnopqrstuvwxyz/22233344455566677778889/;push@{$h{$k}},$n if$k=~$_}$h{$k}
}
&lt;/code&gt;
&lt;b&gt;Update #2:&lt;/b&gt; Now down to 107 with &lt;b&gt;all possibilities&lt;/b&gt;, now returns an array instead of ref to array
&lt;code&gt;
sub num{
$k=shift;for(@_){chomp;lc;$n=$_;y/abcdefghijklmnopqrstuvwxyz/22233344455566677778889/;push@h,$n if$k=~$_}@h
}
&lt;/code&gt;
Returns a reference to &lt;b&gt;all&lt;/b&gt; single words found.
&lt;br&gt;
ie: pass it 7825 and /usr/dict/words and it will return
pub,puck,qua,rub,sub,suck etc.. (not including single letters).</field>
<field name="root_node">
83867</field>
<field name="parent_node">
83867</field>
</data>
</node>
