in reply to pattern matching: why does the following code evaluate true? (and how do i fix it?)
UPDATE: It has been pointed out to me that I am only partly correct. The dot does in fact match anything {Except \n} but it does not behave in a greedy manner. Rather, Perl is saying that the substring ($key2) is found in the other string ($key)... which is ok. I apologize if I confused anyone.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: pattern matching: why does the following code evaluate true? (and how do i fix it?)
by takshaka (Friar) on May 31, 2000 at 02:56 UTC |