@@ -15,7 +15,7 @@ Synopsis 3: Perl 6 Operators
15
15
Created: 8 Mar 2004
16
16
17
17
Last Modified: 9 Apr 2012
18
- Version: 247
18
+ Version: 248
19
19
20
20
=head1 Overview
21
21
@@ -3066,35 +3066,33 @@ the return value of the listop.
3066
3066
foo.() # same as foo()()
3067
3067
foo++ # legal (if foo() is rw)
3068
3068
3069
- If the next item after the list operator is either an infix operator
3070
- or a term, a syntax error is reported. [Conjecture: this may be relaxed in
3071
- non-strict mode.]
3069
+ If the next item after the list operator is either an infix operator,
3070
+ a syntax error is reported.
3072
3071
3073
3072
Examples:
3074
3073
3075
3074
say foo + 1; say(foo(+1));
3076
3075
say foo $x; say(foo($x));
3077
3076
say foo$x; ILLEGAL, need space or parens
3078
3077
say foo+1; ILLEGAL, need space or parens
3079
- say foo++; ILLEGAL, need parens
3080
3078
3081
3079
say foo($bar+1),$baz say(foo($bar+1), $baz);
3082
- say foo.($bar+1),$baz ILLEGAL, need space or parens
3080
+ say foo.($bar+1),$baz say(foo().($bar+1), $baz);
3083
3081
say foo ($bar+1),$baz say(foo($bar+1, $baz));
3084
3082
say foo .($bar+1),$baz say(foo($_.($bar+1), $baz));
3085
3083
3086
- say foo[$bar+1],$baz ILLEGAL, need foo()[]
3087
- say foo.[$bar+1],$baz ILLEGAL, need foo().[]
3084
+ say foo[$bar+1],$baz say(( foo()[$bar+1]), $baz);
3085
+ say foo.[$bar+1],$baz say(( foo()[$bar+1]), $baz);
3088
3086
say foo [$bar+1],$baz say(foo([$bar+1], $baz));
3089
3087
say foo .[$bar+1],$baz say(foo($_.[$bar+1], $baz));
3090
3088
3091
- say foo{$bar+1},$baz ILLEGAL, need foo(){}
3092
- say foo.{$bar+1},$baz ILLEGAL, need foo().{}
3089
+ say foo{$bar+1},$baz say(( foo(){$bar+1}), $baz);
3090
+ say foo.{$bar+1},$baz say(( foo(){$bar+1}), $baz);
3093
3091
say foo {$bar+1},$baz say(foo({$bar+1}, $baz));
3094
3092
say foo .{$bar+1},$baz say(foo($_.{$bar+1}, $baz));
3095
3093
3096
- say foo<$bar+1>,$baz ILLEGAL, need foo()<>
3097
- say foo.<$bar+1>,$baz ILLEGAL, need foo().<>
3094
+ say foo<$bar+1>,$baz say( foo()<$bar+1>, $baz);
3095
+ say foo.<$bar+1>,$baz say( foo()<$bar+1>, $baz);
3098
3096
say foo <$bar+1>,$baz say(foo(<$bar+1>, $baz));
3099
3097
say foo .<$bar+1>,$baz say(foo($_.<$bar+1>, $baz));
3100
3098
0 commit comments