bugfix: len -> scalar

Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/3b6f7e81
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/3b6f7e81
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/3b6f7e81

Branch: refs/heads/master
Commit: 3b6f7e811184cdfa1b6d8fe7552126217668abe1
Parents: 6256361
Author: Matt Post <p...@cs.jhu.edu>
Authored: Sat Oct 15 08:31:17 2016 -0400
Committer: Matt Post <p...@cs.jhu.edu>
Committed: Sat Oct 15 08:31:17 2016 -0400

----------------------------------------------------------------------
 scripts/training/filter-rules.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/3b6f7e81/scripts/training/filter-rules.pl
----------------------------------------------------------------------
diff --git a/scripts/training/filter-rules.pl b/scripts/training/filter-rules.pl
index bebf02e..1240f64 100755
--- a/scripts/training/filter-rules.pl
+++ b/scripts/training/filter-rules.pl
@@ -165,7 +165,7 @@ sub filter_and_print_rules {
       $counts{$rule} = $count;
     }
 
-    if (len(keys(%counts)) > 0) {
+    if (scalar(keys(%counts)) > 0) {
       my @sorted_rules = sort { $counts{$b} <=> $counts{$a} } keys(%counts);
       @filtered_rules = splice(@sorted_rules, 0, $opts{t});
       $SKIPPED{redundant} += scalar(@sorted_rules) - scalar(@filtered_rules);

Reply via email to