Created
August 13, 2012 19:06
-
-
Save swuecho/3343306 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| whileif; | |
| sub whileif { | |
| my @a = 0..9; | |
| my $i = 0; | |
| while $i < 10 { | |
| my $a=@a[$i]; | |
| say $a; | |
| if $a < 1 { | |
| say "less than 1"; | |
| } elsif $a > 1 { # error from rakudo: missing block here. but if I change the last two branches, everything is ok. | |
| say "greater than 1"; | |
| } else { | |
| say "equal 1"; | |
| } | |
| $i++; | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment