Re: sub default question
[email protected] (ToddAndMargo via perl6-users) Wed, 19 Nov 2025 01:59:53 -0800
| Newsgroups | perl.perl6.users |
|---|---|
| Message-ID | <[email protected]> |
On 11/19/25 1:38 AM, Peter Pentchev wrote:
> On Wed, Nov 19, 2025 at 01:13:23AM -0800, ToddAndMargo via perl6-users wrote:
>> Hi All,
>>
>> https://github.com/rakudo/rakudo/blob/main/src/core.c/Proc.rakumod
>> 232: multi sub run(*@args where .so, :$in = '-', :$out = '-', :$err = '-',
>>
>> Here is my confusion. The above sets
>> :$in = '-', :$out = '-', :$err = '-',
>> to "-" as the default.
>>
>> But if you leave
>> :$out and :$err
>> off the run line, STDOUT and STDERR do not
>> get captured and are sent to the console.
>
> ...that's exactly what "-" means.
>
> G'luck,
> Peter
>
According to
https://docs.raku.org/language/glossary#Adverbial_pair
adverbial pair pair notation
:foo foo => True
How did "True" get changed into "-"?