#!/usr/bin/perl use Modern::Perl; use File::Slurp qw/read_file write_file/; my $pfaminput ='Activpospf.txt'; my $seedinput ='PFACtest.txt'; #open POSITIVEOUT, ">", 'ActivPosdata.txt'; #open NEGATIVEOUT, ">", 'ActivNeg.txt'; my %seedin =map{chomp; /(.+)\s+\:\s+(.+)/;$1=>$2;} read_file $seedinput; my $pfam; my @tocheck; my @negative; for $pfam(read_file $pfaminput){ chomp ($pfam); if (defined $seedin{$pfam}) { my @splitter =split(/ /, $seedin{$pfam}); push (@tocheck, @splitter); delete $seedin{$pfam};}}