handle \r properly
authorDon Armstrong <don@donarmstrong.com>
Fri, 25 Jan 2008 03:01:42 +0000 (03:01 +0000)
committerDon Armstrong <don@donarmstrong.com>
Fri, 25 Jan 2008 03:01:42 +0000 (03:01 +0000)
git-svn-id: file:///srv/svn/function2gene/trunk@28 a0738b58-4706-0410-8799-fb830574a030

bin/function2gene

index de4915b..b6810e2 100755 (executable)
@@ -192,6 +192,7 @@ if (@{$options{keywords}}) {
               next if /^\s*[#;]/;
               next unless /\w+/;
               chomp;
+              s/\r$//;
               my ($keyword,$weight) = split /\t/, $_;
               $weight = 1 if not defined $weight;
               $state{keyword_weight}{$keyword} = $weight;