in reply to Re^4: How to match String with Case Sensitive??
in thread How to match String with Case Sensitive??
Hey! You are trying to match a constant against a pattern got from an input string. Is that what you want? Then try what moritz suggested.
If not, change to:
if($test1 =~ m#$test#){
But without i modifier, "abc" will never be the same as "AbC".
Of course, to be "the same" instead of just "contains", use:
if($test1 =~ m#^$test$#){
or:
if($test1 eq $test){
|
|---|