in reply to match text files

Welcome to the monastery, Salwrwr! I'm pretty sure nearly everyone has missed the <code> tags at least once.

A few general tips, and hopefully not too much overlap with the other replies you've already received:

my @values = map { join "\t", (split /\t/)[0..2] } <$fh>; # Later, in your say statement: say $newfile join "\t", @line[0,2,3], $_ for grep { /^$start\t/ } @val +ues;