Advertisement
cwchen

[Perl 6] if .. elsif .. else

Oct 5th, 2017
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.15 KB | None | 0 0
  1. my $n = 0;
  2.  
  3. if $n > 0 {
  4.     say "n is larger than zero";
  5. } elsif $n < 0 {
  6.     say "n is smaller than zero";
  7. } else {
  8.     say "n is equal to zero";
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement