--- loncom/localize/localize/checksimilar_2files.pl 2010/08/03 13:00:21 1.2 +++ loncom/localize/localize/checksimilar_2files.pl 2013/01/07 15:13:26 1.3 @@ -1,6 +1,6 @@ #!/usr/bin/perl # The LearningOnline Network with CAPA -# $Id: checksimilar_2files.pl,v 1.2 2010/08/03 13:00:21 bisitz Exp $ +# $Id: checksimilar_2files.pl,v 1.3 2013/01/07 15:13:26 bisitz Exp $ use strict; use warnings; @@ -70,12 +70,13 @@ sub CourseCommunity { my $file1 = $ARGV[0]; # Old language.pm my $file2 = $ARGV[1]; # New Phrases + +print("Checking for similar expressions in phrases in $file1 and $file2...\n"); + my %langOLD = &read($file1); #Hash with old phrases my %langNEW = &read($file2); #Hash with new phrases my $dlm; -my $count = 1; #Counter - -open(OUT,'>similarities.txt') or die; +my $count = 0; # For each new phrase, check if there is already a similar one while( my ($kNEW, $vNEW) = each %langNEW ) { @@ -98,8 +99,8 @@ while( my ($kNEW, $vNEW) = each %langNEW } else { $dlm = "'"; } - print OUT (< $dlm$vOLD$dlm,