Dear All,
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
I am looking for the latin names also like Homo sapiens etc. What i want to do now is not to miss the hits that could be " human " instead of " Human " or " mouse " instead of " Mouse ", i.e i want to look for all combinations of the words existing with uppercase and lowercase letters.
I have an incling that i could use \u and \U or \L and \l.
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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.