Sachin has asked for the wisdom of the Perl Monks concerning the following question:
Anybody can tell me any method to match Case Sensitive String. I wouldnot like to convert the $test1 in lowercase. I want to match as it is.
#! /usr/bin/perl my $test = "abc"; my $test1 = "AbC"; if($test =~ m#$test1#i){ print "\n Both are Same"; } else{ print "\n Both are not Same"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to match String with Case Sensitive??
by moritz (Cardinal) on Oct 30, 2009 at 11:46 UTC | |
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 |