in reply to Reading two files, cmp certain cols

Hi, could you please use <readmore> tags for code of this length. Also consider to use perltidy to format your code.

The previous poster already gave you a fix, so I just want to give you a little advice:
Your construct:

if ($current_line[0] eq $key) { if ($current_line[1] == $position1) { if ($current_line[2] ==1) { if ($current_line[3] >= 3) { print join ("\t", $current_line[0],$current_line[1],$current +_line[2],$current_line[3], "***",$key, $position1), "\n"; } } } }
is much tidier written this way:
if ( $current_line[0] eq $key && $current_line[1] == $position1 && $current_line[2] == 1 && $current_line[3] >= 3) { print join ("\t", @current_line[0..3], "***", $key, $position1), " +\n"; }