X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FSoundex.pm;h=64a9e6507d56fbb5ac38bafb441b75e14d33041b;hb=df26a7db8f2a7fec12d403bcefa0501353e16991;hp=a334404667a4ab8e5ba241b04c49b3e826f6d6c2;hpb=cb1a09d0194fed9b905df7b04a4bc031d354609d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Text/Soundex.pm b/lib/Text/Soundex.pm index a334404..64a9e65 100644 --- a/lib/Text/Soundex.pm +++ b/lib/Text/Soundex.pm @@ -5,11 +5,13 @@ require Exporter; @ISA = qw(Exporter); @EXPORT = qw(&soundex $soundex_nocode); +$VERSION = '1.01'; + # $Id: soundex.pl,v 1.2 1994/03/24 00:30:27 mike Exp $ # # Implementation of soundex algorithm as described by Knuth in volume # 3 of The Art of Computer Programming, with ideas stolen from Ian -# Phillips . +# Phillipps . # # Mike Stok , 2 March 1994. # @@ -48,7 +50,7 @@ sub soundex foreach (@s) { - tr/a-z/A-Z/; + $_ = uc $_; tr/A-Z//cd; if ($_ eq '') @@ -106,7 +108,7 @@ many people seem to prefer an I value like C can be assigned to C<$soundex_nocode>. In scalar context C returns the soundex code of its first -argument, and in array context a list is returned in which each element is the +argument, and in list context a list is returned in which each element is the soundex code for the corresponding argument passed to C e.g. @codes = soundex qw(Mike Stok); @@ -144,5 +146,5 @@ of C. =head1 AUTHOR This code was implemented by Mike Stok (C) from the -description given by Knuth. Ian Phillips (C) and Rich Pinder +description given by Knuth. Ian Phillipps (C) and Rich Pinder (C) supplied ideas and spotted mistakes.