in reply to Re: Weird "soundex" algorithm
in thread Weird "soundex" algorithm
Nice. I was unhappy with your vowel stripping though. You use a looping match for offsets into $_ but really, you only have to find the *first* vowel and then no looping is required.
# m/[aeiou]/g and substr($_, pos) =~ s/[aieuo]//g; /[aeiou]/ and substr( $_, $+[0] ) =~ tr/aeiou//d;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Weird "soundex" algorithm
by broquaint (Abbot) on Aug 28, 2003 at 23:58 UTC | |
by diotalevi (Canon) on Aug 29, 2003 at 01:53 UTC |