#!/usr/local/bin/perl use warnings; use strict; use LWP::Simple; use HTML::TreeBuilder; my @files = (["http://microrna.sanger.ac.uk/cgi-bin/targets/v5/detail_view.pl?transcript_id=ENST00000226253", "a.txt"],); for my $duplet (@files) { mirror($duplet->[0], $duplet->[1]); }; open DATA, 'a.txt'; my $html = do{local $/;}; my $p = HTML::TreeBuilder->new; $p->parse_content($html); # parse_content if you have a string my @tds = $p->look_down(_tag => q{td}); # get a list of all the td tags for my $td (@tds){ my $bold = $td->look_down(_tag => q{b}); # look for a bold tag if ($bold){ print $bold->as_text, qq{\n}; # if there is one print the text } } $p->delete; # when you've finished with it #### Gene Name Gene Name Transcript Gene Description Alignment View Hit infomation mmu-miR-705 mmu-miR-705 hsa-let-7d hsa-let-7e hsa-miR-483-5p mmu-miR-683 hsa-miR-650 hsa-miR-920 mmu-miR-709 hsa-miR-26b* hsa-miR-185 hsa-let-7a hsa-miR-765 hsa-miR-629* hsa-miR-19b-2* hsa-miR-31 mmu-miR-707 hsa-miR-665 hsa-miR-339-5p hsa-let-7c hsa-let-7b hsa-miR-7 hsa-miR-26b* hsa-let-7g hsa-miR-382 hsa-miR-454* hsa-miR-501-5p mmu-miR-666-5p hsa-miR-486-3p hsa-let-7f mmu-miR-680 hsa-miR-219-2-3p hsa-miR-153 hsa-miR-26a-2* hsa-miR-328 hsa-miR-220c hsa-miR-19a* hsa-miR-433 hsa-miR-769-5p hsa-miR-26b* hsa-miR-19a* hsa-miR-19b-1* hsa-miR-25* hsa-miR-483-5p mmu-miR-685 hsa-miR-938 mmu-miR-465a-3p hsa-miR-139-3p hsa-miR-187* mmu-miR-687 Features #### #!/usr/local/bin/perl use warnings; use strict; use LWP::Simple; use HTML::TreeBuilder; my @files = (["http://microrna.sanger.ac.uk/cgi-bin/targets/v5/detail_view.pl?transcript_id=ENST00000226253", "a.txt"],); for my $duplet (@files) { mirror($duplet->[0], $duplet->[1]); }; open DATA, 'a.txt'; my $html = do{local $/;}; my $p = HTML::TreeBuilder->new; $p->parse_content($html); # parse_content if you have a string my @tds = $p->look_down(_tag => q{td}); # get a list of all the td tags for my $td (@tds){ my $bold = $td->look_down(_tag => q{b}); # look for a bold tag if ($bold=~ m/miR/ || $bold=~ m/let/){ print $bold->as_text, qq{\n}; # if there is one print the text } } $p->delete; # when you've finished with it