Or you can do
if (lc($a2) eq lc($a2)) {
# do something
}else {
# do something else
}
;-)
> Or even if you don't want them to be identical but just similar in that they
> contain the same string somewhere within the variable, i.e.
>
> $a2 = 'Lambott';
> $a3 = 'fooLambottblah';
>
> if (
f the
string, rather than changing the case of the string.
-Original Message-
From: Dennis Stout [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 1:51 AM
To: Scot Robnett; [EMAIL PROTECTED]
Cc: Boon Chong Ang; Annie
Subject: Re: how to compare to string variables
> Or even if y
> Or even if you don't want them to be identical but just similar in that they
> contain the same string somewhere within the variable, i.e.
>
> $a2 = 'Lambott';
> $a3 = 'fooLambottblah';
>
> if ($a3 =~ /$a2/) {
> # do something
> }
> else {
> # do something else
> }
>
> or what if you want to m
--
From: Boon Chong Ang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 1:33 AM
To: Annie; [EMAIL PROTECTED]
Subject: RE: how to compare to string variables
If($a2 eq $a3) { ...}
else {}
Is this what you want?
Thank you & best regards,
ABC
-Original Message-
From: Anni
If($a2 eq $a3) { ...}
else {}
Is this what you want?
Thank you & best regards,
ABC
-Original Message-
From: Annie [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:31 PM
To: [EMAIL PROTECTED]
Subject: how to compare to string variables
I have two strings which
I have two strings which I am receiving from two text fields in a form. I want to
compare these...
$a2='Lambott'
$a3='Lambott'
can anyone tell me how i can compare that the string inside a2 and a3 is similar.
thanks
-
Do you Yahoo!?
Free online calendar with syn