Soundex function : Text « System Functions « Perl






Soundex function

      

#!/usr/bin/perl

use warnings;
use strict;

use Text::Soundex;

while (<>) {
    chomp;   #remove trailing linefeed
    s/\W/ /g;   #zap punctuation, e.g. '.', '@'
    print "'$_' => '@{[soundex(split)]}'\n";
}

   
    
    
    
    
    
  








Related examples in the same category

1.Get abbreviations
2.Read password
3.use Text::Abbrev;
4.use Text::Tabs to set the tab size