$string = 'complex'; open(REF, "; close(REF); open (ET, ") { chomp; /^(\S+\s+\S+)\s+.*($string\.\d+).*$/; print OUT ($1, $pd_file{$2}) if (exists($pd_file{$2}));