On 2/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Thank you both. I am trying to find out why "!~" operator fails. It is due to the
whitespaces. but I am using "six" to ignore spaces.
Sorry guys. Below is the actual code. I made the changes that A.R. Ferreira
suggested and it fai
Subject: Re: BInding operator fails
On 2/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Tom your code works fine. But I was tring to understand why "!~" fails
> above.
> > if ($result !~ /$rdns/ix) {
>
> That's checking whether $rdns, as a p
[EMAIL PROTECTED] am Montag, 26. Februar 2007 18:49:
[snip]
Hi!
> use strict;
> use warnings;
>
> my $rdns="cn=Exchange Sites,cn=Proxy Views,cn=JoinEngine
> Configuration,ou=Conf,o u=InJoin,ou=applications,dc=marriott,dc=com";
>
> my $result="cn=Exchange Sites";
>
> if ($result !~ /\Q$rdns\E/six)
On 2/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Tom your code works fine. But I was tring to understand why "!~" fails
above.
> if ($result !~ /$rdns/ix) {
That's checking whether $rdns, as a pattern, does not match the string
in $result.
That's why it "fails": It does not mean
=InJoin,ou=applications,dc=marriott,dc=com";
my $result="cn=Exchange Sites";
if ($result !~ /\Q$rdns\E/six) {
print "\nresult: '$result'";
print "\nrdn: '$rdns'\n";
} else {
print "String is there\n";
}
OUTPUT is:
String
dns\E/six) {
print "\nresult: '$result'";
print "\nrdn: '$rdns'\n";
} else {
print "String is there\n";
}
OUTPUT is:
String is there
-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: beginners@perl.org
Sent: Mon, 26
On 2/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi. I have a problem with the below code. I have two strings, $rdns and
$result1.
I want to make sure $result 1 is NOT part of $rdns. But the below fails...thus
instead of printing the else part of the if-else-loop. It print the main
On 2/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
All,
Hi. I have a problem with the below code. I have two strings, $rdns and
$result1. I want to make sure $result 1 is NOT part of $rdns. But the below
fails...thus instead of printing the else part of the if-else-loop. It print
t