On Mon, Mar 13, 2017 at 12:37 PM, Will Coleda <w...@coleda.com> wrote:
> Works the same in Perl 6, and you can avoid the parens. Using helper > subs that return one or two item lists, here's some sample code: > > $ perl6 > > sub one-thing { return ("hi",) } > sub one-thing () { #`(Sub|140454852043936) ... } > > 1 == my $script = one-thing > True > > $script > (hi) > > But then: > $script.WHAT (List) In the Perl 5 version, $script is assigned the single element of the returned list. In your code, it refers to the list itself. (Also, wait: It looks like "=" has higher precedence than "=="? Or does the "my" affect the parsing somehow?)