In a message dated 1/11/2003 9:43:32 AM Eastern Standard Time, 
[EMAIL PROTECTED] writes:


> if ($SRF=1 and $SRL=1) {print"YES";)

You got the and right, but the conditional wrong. 2 equal signs for 
conditionals.
So your example:
$SRF = 1; $SRL = 1;
if ($SRF==1 and $SRL==1) {print"YES";} #True

or is
$SRF = 1; $SRL = 1;
if ($SRF==1 or $SRL==1) {print"YES";} #True

xor (both not true, 1 is)
$SRF = 1; $SRL = 1;
if ($SRF==1 xor $SRL==1) {print"YES";} #False

You can also use  | and & for logical and bitwise "and" or "or" .
<A HREF="http://www.cs.appstate.edu/~can/classes/3481/IA/3481PerlTABLES.html";>(The 
CS-3481 Perl Tables</A>)

Reply via email to