#!/usr/bin/perl use warnings; use strict; my $filename = 'pedigree_proband_testfile.txt'; open (FILE, "<", $filename) or die "Cannot open file $!"; my @data = ; my @column; my $motherID; foreach my $line (@data) { @column = split ( /\t/, $line); if ($column[13] eq "" && $column[4] ne "" ) { $motherID = join($column[2],$column[4]); if ("$motherID" eq "$column[2]") { print "$line\t\n"; } } }