Thank you, but I tried but it doesn't work...It only print legami idrofobici: legami idrogeno: so the script runs but it doesn't do what I want...
#!/usr/local/bin/perl use strict; use warnings; use LWP::Simple; open (IN, "</home/nerone/Desktop/lig/1xmj.pl") || die "impossibile apr +ire il file"; my ( @hydrophobic , @residue ); while ( my $r = <DATA> ) { if ( $r=~ m/Hydrophnam_size Center/ .. $r =~ /Hydrophnam_size/ ) { push @hydrophobic , $r; next; } if( $r=~ m/Nligresnam_size Center/ .. $r =~ /Nligresnam_size/) { push @residue , $r; } } printf "legami idrofobici: %s\n" , join '' , @hydrophobic; printf "legami idrogeno: %s\n" , join '' , @residue; __DATA__
I don't know well that synthax....but it doesn't work
In reply to Re^2: problems with pattern match
by paola82
in thread SOLVED:problems with pattern match
by paola82
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |