Re: I need sub returns help
[email protected] (Tom Browder) Mon, 27 Oct 2025 05:13:34 -0500
| Newsgroups | perl.perl6.users |
|---|---|
| Message-ID | <CAFMGiz-C6RXrGyWq2jgC01LODbXku8nmeEJ=jZfsU0H9WVU5-w@mail.gmail.com> |
On Sun, Oct 26, 2025 at 19:46 ToddAndMargo via perl6-users < [email protected]> wrote: > Hi All, > > What am I doing wrong here? I want > two things in my "returns". > > > [2] > sub x() returns Bool,Str {} > ===SORRY!=== Error while compiling: > Missing block > ------> sub x() returns Bool⏏,Str {} > expecting any of: > new name to be defined > > Yours in confusion, > -T Return a List of a defined Bool and Str: sub x(--> List) { my Str $s = "hello"; my Bool $b = True; $b, $s; } say x; OUTPUT: (True hello) -Tom