in reply to Perl Recursion
my @a=`awk '\$1 ~ /$_[0]/' useful_dat.tab |cut -f 2,3|sort|uniq`: foreach (@a){ my @b=split(/\t/,$_); if($b[1] eq 'Activation'){
You don't chomp the lines from useful_dat.tab so "Activation\n" will never be equal to 'Activation'.
You should probably store the contents of useful_dat.tab in a hash instead of using an external process to read the same file multiple times.
In Section
Seekers of Perl Wisdom