Nandini21 has asked for the wisdom of the Perl Monks concerning the following question:
My script is fine, its just giving range error while matching with terms like below:open IN, "d1.txt" or die "No such file:$!\n"; open OUT, ">ABC.txt" or die; while(<IN>) { chomp $_; $a[$l]=$_; ++$l; } my @array=qw(doxorubicin is a potent anti-estrogen drug and tamoxifen) +; for($i=0;$i<$l;++$i) { foreach $z(@array) { if($z=~m/\b\w^$a[$i]$\b/i) { $z=~s/$z/<span style="background-color:yellow;">$z<\/span>/; $i++; print "@array "; } } }
Can somebody tell me how to turn off the effect of such characters like brackets, range operator etc(5r)-6-(4-{[2-(3-Iodobenzyl)-3-Oxocyclohex-1-En-1-Yl]Amino}Phenyl)-5-M +ethyl-4,5-Dihydropyridazin-3(2h)-One show range error at 2-(
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Invalid range []
by jwkrahn (Abbot) on Dec 12, 2011 at 10:02 UTC | |
|
Re: Invalid range []
by moritz (Cardinal) on Dec 12, 2011 at 05:41 UTC |