Re: What is the pipe symbol doing to my array?

[email protected] (ToddAndMargo via perl6-users) Sun, 2 Nov 2025 15:36:40 -0800
Newsgroups perl.perl6.users
Message-ID <[email protected]>
On 11/2/25 1:25 PM, ToddAndMargo via perl6-users wrote:
> Hi All,
> 
> I see what is happening, but exactly what I am not sure:
> 
> [0] > my @x="a","b","c","d";
> [a b c d]
> 
> [1] > say @x
> [a b c d]
> 
> [1] > say |@x
> abcd
> 
> 
> I ask because I want to know its effect is on
>      my $proc = run(|@x, :err, :out)
> 
> 
> Many thanks,
> -T
> 

Search.brave.com gave me this back.  Is it correct?
(I fear "AI Slop").

https://search.brave.com/search?q=raku+what+dows+a+pipe+sign+in+front+of+an+array+variable+do%3F&summary=1&conversation=239b87cf62ce8a58a8bd45

If you are referring to the | symbol in the context of array
slicing or flattening, it can be used in list context to
flatten an array into a list of its elements, but this is
not done by placing | directly in front of the variable name.
Instead, it is used in expressions like |@array to flatten
the array into a list.