You can compare two values or scalar variables using the if
statement and one of the comparison operators.
Example 2-9. examples/scalars/if.p6
#!/usr/bin/perl6
my $age = 23;
if $age > 6 {
say "You can be on the Pugs development team";
}
Though I am not sure this limit is enforced by Audrey....
| Prev | Home (Copyright Gabor Szabo) Perl Training Israel | Next |
| String operators | Up | Comparison Operators |