swuecho
1/25/2013 - 1:02 AM

test.md

 say ~(1..100).pick(5)
 say ~(1..100).pick(5)
 "Thing"."uc"."say"
 "Thing"."uc"()."say"()
 say << 'foo bar' 'baz' >>.perl
 « foo '»' »
 say « foo '»' »
 say « foo '»' ».perl
 sub foo(*@x) { @x.join().WHAT.say }; foo(1|2|3)
 my @rand := rand xx *; for (@rand Z (0 ... *)) -> $r, $t { last if $t > 4; say $r }
 my @rand := 0 ... *; for (@rand Z (0 ... *)) -> $r, $t { last if $t > 4; say $r }
 for (0 ... * Z 10 ... *) -> $a, $b { last if $b > 15; say $a }
 for ((rand xx *) Z 10 ... *) -> $a, $b { last if $b > 15; say $a }
 for ((rand, { rand } ... *) Z 10 ... *) -> $a, $b { last if $b > 15; say $a }
 say (rand, { rand } ... *)[^10]
 say (rand, { rand } ... * Z 0 ... *)[^10]
 say ((rand, { rand } ... *) Z (0 ... *))[^10]
 for ((rand, { rand } ... *) Z (0 ... *)) -> $a, $b { say $a; last if $b > 5 }
 for ((rand, { rand } ... *) Z (0 ... *)) -> ($a, $b) { say $a; last if $b > 5 }
 for ((rand, { rand } ... *) Z (0 ... *))[^50] -> ($a, $b) { say $a; last if $b > 5 }
 for ((1, 2, 3, 4) Z (5, 6, 7, 8)) -> $a, $b { say "$a, $b"; last if $b >= 6 }
 for ((0 ... *) Z (5, 6, 7, 8)) -> $a, $b { say "$a, $b"; last if $b >= 6 }
 for ((0 ... *) Z (0 ... *)) -> $a, $b { say "$a, $b"; last if $b >= 6 }
 module Foo { my $*foo; our sub foo { temp $*foo } }; module Bar { Foo::foo }
 module Foo { my $*foo; our sub foo { temp $*foo } }; module Bar { }
 module Foo { my $*foo; our sub foo { say $*foo } }; module Bar { Foo::foo }