Ok, here's one of those "what am I doing wrong" questions that I'm sure has an answer so simple I'm just over looking it.
I'm searching a flatfile database with the code:
if ($thread_data[4] =~ m/$in{for}/i) {
print $thread_data[0];
}
where $thread_data[4] is what I'm seaching in, $in{for} is what I'm seaching for, and thread_data[0] is an index number telling me what thread returned true. This returns results, but it often returns results that don't contain any part of $in{for} string.
So my question is, what am I getting these erronious results?
Thanks in advance
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.