natoikos has asked for the wisdom of the Perl Monks concerning the following question:
if i use the array entry probes1 it doesn't work, but if i assign a variable to the same exact value 204508_A_ST and use that instead, it does. is there something i am missing regarding the array probes entry?open INDAT, "file1" or die "$!"; my @array; my @probes; while (<INDAT>){ @array=split/\t/; open INCOMP, "file2" or die "$!"; while (<INCOMP>){ @probes=split/\t/; if ($array[0]=~/$probes[1]/i){ print $probes[1];#or whatever else } } close INCOMP; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: beginner regex question
by vennirajan (Friar) on Dec 30, 2005 at 05:00 UTC | |
|
Re: beginner regex question
by Ovid (Cardinal) on Dec 30, 2005 at 04:52 UTC | |
|
Re: beginner regex question
by Samy_rio (Vicar) on Dec 30, 2005 at 04:41 UTC | |
|
Re: beginner regex question
by hj4jc (Beadle) on Dec 30, 2005 at 21:32 UTC |