foreach my $line (@flab) { if ($line =~ /[^\t]*\Q$sTab[1]\E\t([^\t]+)/) { print RESULT "$sTab[0]\t$sTab[1]\t$2\n"; } }