> #!/usr/bin/perl -w > > use strict; > use diagnostics; > > > my $a = 1; > my $b = 2; > my $c = 2; > my $d; > > print "xor1" if ($a = $a) ^ ($b = $c);#prints > > print "xor2" if ($a = $b) ^ ($b = $c);#no print > > print "xor3" if ($a = $b) xor ($b = $c);#no print > > print "xor4" if ($a = $a) xor ($b = $c);#no prints > > print "xor5" if $a xor $b;#no prints > > print "xor6" if $a xor $d;#prints > > > # so --- how do i use xor and ^ ??? i'd like to use it > # for statements like the first few.... *sigh* > # > # i don't understand why the first one prints.... i really > # need clarification on this one! > # > # > > thanks :)
Soe of the weirdness amy be coming from using the $a and $b variables which are usually used and set by Perl. For instance in the sort() fuunction. HTH DMuey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]