in reply to How to match String with Case Sensitive??
If you want case sensitive matching, just remove the i at the end.
In any case your test will return true if $test1 is a substring of $test, and if it contains special regex syntax it's something else completely. So you could do
instead to avoid that.if ($test =~ m/^\Q$test1\E\z/) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to match String with Case Sensitive??
by Sachin (Acolyte) on Oct 30, 2009 at 12:14 UTC | |
by Anonymous Monk on Oct 30, 2009 at 12:17 UTC | |
by Sachin (Acolyte) on Oct 30, 2009 at 12:27 UTC | |
by vitoco (Hermit) on Oct 30, 2009 at 13:12 UTC |