From 444329df857cf09539db00a80e0a6a475ba338e2 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 8 May 2015 09:53:08 -0700 Subject: [PATCH] fix the look_down to only look at th and td elements --- parse_geneimprint.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse_geneimprint.pl b/parse_geneimprint.pl index 4f36a9a..7de04b0 100755 --- a/parse_geneimprint.pl +++ b/parse_geneimprint.pl @@ -80,7 +80,7 @@ my $t = HTML::Tree->new_from_file($ARGV[0]) or # the table we want is currently the first table my $table = $t->look_down(_tag=>'table'); for my $row ($table->look_down(_tag=>'tr')) { - print join("\t",map{my $a = $_->as_text(); $a =~ s/\xA0/ /g; $a;} $row->descendents())."\n"; + print join("\t",map{my $a = $_->as_text(); $a =~ s/[\xA0\t]/ /g; $a;} $row->look_down(_tag => qr/^(?:th|td)$/))."\n"; } -- 2.39.2