in reply to Memory Leak when using Lingua::EN::MatchNames

Hi, I've reproduced your problem, and I think I've got a fix. If I look at the documentation for Lingua::EN::MatchNames I see you should use 4 arguments instead of 2:
use Lingua::EN::MatchNames; $score= name_eq( $firstn_0, $lastn_0, $firstn_1, $lastn_1 );
When I change your NameComp function to this:
sub NameComp () { foreach $curusername (@curuserlist) { my ($firstn_0, $lastn_0)= split '\s+', $_[0]; my ($firstn_1, $lastn_1)= split '\s+', $curlookup{$cur +username}; print "comparing $firstn_0, $lastn_0 to $firstn_1, $la +stn_1\n"; my $name_score = name_eq($firstn_0, $lastn_0, $firstn_ +1, $lastn_1); print "$name_score\n"; if ($name_score >= 80){ print "Found Match $curlookup{$curusername}\n" +; } } }
it not only runs a lot faster, the memory usage doesn't increase after the first round of NameComp. But this doesn't explain why the memory-usage keeps increasing in the original case, I'd like to know as well. As you might have seen in a previous post (Memory usage breakup), I'm quite interested in how to manipulate perl memory usage myself.

Please be very cautious naming stuff like this 'memory leaks', It's quite normal perl uses a lot of memory because all memory that is released when variables are not refered to anymore, is not released to the OS, but perl keeps this memory allocated (at least according to theory, in the post I mentioned people claim perl releases memory to the OS, which I haven't been able to reproduce on FreeBSD).