Cincyman has asked for the wisdom of the Perl Monks concerning the following question:
executing with perl -w matcher.pl test.xt test2.txt test.txt contains the following entriesuse Lingua::EN::MatchNames; open (TERMFILE, $ARGV[0]); my(@termusers) = <TERMFILE>; chomp @termusers; open (USERFILE, $ARGV[1]); my(@curusers) = <USERFILE>; chomp @curusers; open (DUPFILE, ">dup.$ARGV[1]"); ####Lets Create the Hash################ foreach $curuser (@curusers) { chomp $curuser; $curusercounter++; print "Adding current user $curusercounter $curuser to Array\n +"; $curlookup{$curusercounter} = $curuser; } foreach $termuser (@termusers) { chomp $termuser; $termusercounter++; print "Adding Term user $termusercounter $termuser to Array\n" +; $termlookup{$termusercounter} = $termuser; } @termuserlist = keys %termlookup; @curuserlist = keys %curlookup; foreach $termusername (@termuserlist) { &NameComp($termlookup{$termusername}) } sub NameComp () { foreach $curusername (@curuserlist) { print "comparing $_[0] to $curlookup{$curusername}\n"; my $name_score = (name_eq($_[0], $curlookup{$curuserna +me})); print "$name_score\n"; if ($name_score >= 80){ print "Found Match $curlookup{$curusername}\n" +; } } } close (TERMFILE); close (USERFILE); close (DUPFILE);
Updated Steve_p - changed module mentioned in title from MatchNames.pm to Lingua::EN::MatchNames
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Memory Leak when using Lingua::EN::MatchNames
by TomDLux (Vicar) on May 05, 2004 at 00:11 UTC | |
|
Re: Memory Leak when using Lingua::EN::MatchNames
by eXile (Priest) on May 04, 2004 at 21:30 UTC | |
|
Re: Memory Leak when using Lingua::EN::MatchNames
by allolex (Curate) on May 04, 2004 at 21:41 UTC |