Hi Monks, my web site is down and I can't figure out this problem:
I have an array with five file names which are:
11x0.htm
12x0.htm
1x0.htm
20x0.htm
8x0.htm
I have a variable called $THREAD, if thread equal "1"
during a foreach loop I'm trying to use pattern matching to find the file that begins with 1, not 11, not 12, but 1 which in this case is "1x0.htm". The file at somepoint might be named 1x2, 1x12, ect. But the key is held in the $THREAD variable.
My pattern matching is not working:
I've tried everything, I thought this should work:
$THREAD= "1"
if ($filedir =~ /$THREADx*.htm/) {
Thanks in advance for any help.
Edited by Chady -- retitled from 'Emergency Help'
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.