in reply to beginner regex question
Hi natoikos, Use chomp after reading a line from the files.
Try this,
open INDAT, "$file1" or die "$!"; my @array; my @probes; while (<INDAT>){ chomp($_); @array=split/\t/; open INCOMP, "$file2" or die "$!"; while (<INCOMP>){ chomp($_); @probes=split/\t/; if ($array[0]=~/$probes[1]/i){ print $probes[1];#or whatever else } } close INCOMP; }
Regards,
Velusamy R.
|
|---|