in reply to Help with program for proteins

Are you using strict and warnings?

Where does $acc come from in

if ($units =~ /.*AC $acc/)

Replies are listed 'Best First'.
Re^2: Help with program for proteins
by jemswira (Novice) on Jan 05, 2012 at 13:40 UTC
    foreach $i(@splitted){ if ($i=~/\b\w{6}\b/ and $i !~/\_/){ $acc=$i;

    If the accession number in the first file matched one in a line of the second one, then I'd push @pfx into @list. at least that was the plan