my %activ = map { s/\.\d+//g; /(.+)\s+\|\s+(.+)/; $1 => $2 } read_file $activin; # Line 20
my %antiox = map { s/\.\d+//g; /(.+)\s+\|\s+(.+)/; $1 => $2 } read_file $antioxin; # Line 21
my %toxin = map { s/\.\d+//g; /(.+)\s+\|\s+(.+)/; $1 => $2 } read_file $toxinin; # Line 22
for ( read_file $uniprot ) { # Line 23
/(.{6})\s+.+=([^\s]+)/; # Line 24
push @activline, "$1 | $2 | $activ{$1}\n" if $activ{$1}; # Line 26
push @antioxline, "$1 | $2 | $antiox{$1}\n" if $antiox{$1}; # Line 27
push @toxinline, "$1 | $2 | $toxin{$1}\n" if $toxin{$1}; # Line 28
}
####
for my $file (qw/Activator-PFAM.txt AntiOxidant-PFAM.txt Toxin-PFAM.txt/){
for(read_file $file){
say "No Match in File: $file; Line: $_" if !/(.+)\s+\|\s+(.+)/;
}
}
##
##
No Match in File: test2.txt; Line:
##
##
my %data = map {s/\.\d+//g; /(.+)\s+\|\s+(.+)/ and $1 => $2 } grep /\S/, read_file $test2;