Just a couple more p5/pugs anomalies I noticed.

# This does not work in pugs: "No compatible subroutine found: &my".
my $x = my $y = 0;

I noticed the next one when using the new slurp() function.
Looks like an operator precedence problem.

# cat f.p6
sub ret_list_0 { () }
sub ret_list_3 { ( 'abc', 'xyz', 123 ) }
my $x0 = 0; my $x3 = 0;
my @a0 = ret_list_0() or $x0 = 1;
my @a3 = ret_list_3() or $x3 = 1;
print "x0='$x0' x3='$x3'\n";
for (@a0) { print "0:'$_'\n" }
for (@a3) { print "3:'$_'\n" }

# perl -w f.p6
x0='1' x3='0'
3:'abc'
3:'xyz'
3:'123'

# pugs f.p6
x0='1' x3='0'
0:'1'
3:'abc'
3:'xyz'
3:'123'

/-\


Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

Reply via email to