| Perl Programming | ||
|---|---|---|
| Boolean Operators | ||
my ($a, $b) = ("apple", "orange");
print "1: apples are oranges\n" if ($a eq $b); # False
print "2: apples are oranges\n" if ($a == $b); # True!
my ($x, $y) = (12, 100);
print "3: $x is more than $y\n" if ($x gt $y); # True!
print "4: $x is more than $y\n" if ($x > $y); # False
2: apples are oranges
3: 12 is more than 100
|
||
| Previous | http://stuff.mit.edu/iap/perl/ | Next |