MonkPaul has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to think of a way of getting all possible cases of a word to be looked at.
In a file i have some data like:
>gi|1870687|gb|U77948.1|HSU77948 Human Bruton's tyrosine kinase-associ +ated protein-135 mRNA, >gi|22415887|emb|AL683818.12| Mouse DNA sequence from clone RP23-229B2 +3 on chromosome 4, complete
What i am stuck with now is how to use them in the instance of this if statement, where the word is stored within the $filter scalar.
if($current_subject =~ /\b\Q$filter\E\b/) # filter and get exact name
note: the $current_subject is the current line in the file
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Checking for all cases of a word
by prasadbabu (Prior) on Jul 04, 2005 at 14:15 UTC | |
Re: Checking for all cases of a word
by Nevtlathiel (Friar) on Jul 04, 2005 at 14:19 UTC | |
by MonkPaul (Friar) on Jul 04, 2005 at 14:41 UTC | |
Re: Checking for all cases of a word
by Limbic~Region (Chancellor) on Jul 04, 2005 at 17:55 UTC |