http://qs1969.pair.com?node_id=780308

paola82 has asked for the wisdom of the Perl Monks concerning the following question:

Hi dear monks, I'm sorry to disturb you again...for problem solved before...but I have a long script...and I parsed as I did before but...now I don't know why it doesn't work...I'm not able to find the errors...the synthax seems ok...I'll paste an example code, because...the code is too long

#!/usr/local/bin/perl use strict; use warnings; use LWP::Simple; use HTML::TreeBuilder; my $url="http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsu +m/GetPage.pl?pdbcode=1r9t&template=main.html"; my $content=get ($url); my $chain; my @chains; my $p = HTML::TreeBuilder->new; $p->parse_content($content); my @tds = $p->look_down(_tag => q{td}); for my $td (@tds) { my $a = $td->look_down(_tag => q{a}); next unless $a; if ($a) { my $href = $a->attr(q{href}); if ($href =~ /&chain=(\w)"/) { print $1 qq{\n}; $chain=$1; push @chains, $chain; #I want to extract the chains +....A,B,C,D,E,F,H,I,J,K,L } } $p->delete; }

in this part I only want to print and push into an array the chains of the protein....so that my array would be @chains(A,B,C,etc....) but it doesn't work...If anyone could help me...please...I'm running a little crazy...thanks you all