Hi
Your example is AND'ing the results of the two matches, so will return true
if both matches occur.
An example of comparing characters using the bitwise AND and the result
might help, or confuse you more thoroughly :)
hth
Rod
my $a = "a";
my $A = "A";
my $B = "B";
foreach ($A,$B,$a) {
my $bittest = ($A & $_);
my $logicaltest = ($A && $_);
print "Comparing ",$A," with ", $_,"\n";
printf("Bitwise\nResult is %s\tHex value %x\n\n",$bittest, ord
$bittest);
printf("Logical\nResult is %s\tHex value %x\n",$logicaltest, ord
$logicaltest);
print"\n";
};
OUTPUT
Comparing A with A
Bitwise
Result is A Hex value 41
Logical
Result is A Hex value 41
Comparing A with B
Bitwise
Result is @ Hex value 40
Logical
Result is B Hex value 42
Comparing A with a
Bitwise
Result is A Hex value 41
Logical
Result is a Hex value 61
The information contained in this e-mail is intended only for the individual
or entity
to whom it is addressed. Its contents (including any attachments) are
confidential
and may contain privileged information.
If you are not an intended recipient you must not use, disclose,
disseminate, copy
or print its contents. If you receive this email in error, please delete and
destroy
the message and notify the sender by reply email.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]