if statement - comparing values
You can compare two values or scalar variables using the if
statement and one of the comparison operators.
examples/scalars/if.p6
#!/usr/bin/env perl6
use v6;
my $age = 23;
if $age > 18 {
say "You can vote in most countries.";
}
Table of Contents
Comments
In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by