Dear Fagyal, Huh. Strange. I tried the code on its own without the rest of the script and it did just fine as well. There must be something wrong in my script somewhere.
Chris On 5/23/06, Fagyal Csongor <[EMAIL PROTECTED]> wrote:
Chris, Strange. I have just tried this using an old version (6.2.3) of Pugs: my (@array) = 1,2,3; print @array[0] ~ "|" ~ @array[1] ~ "|" ~ @array[2] ~ "\n"; It prints 1|2|3 on my terminal. Gabor's join-ed version also works. - Fagzal > Oops. That last . is a typo on my part. Sorry about that! It should > read, which it does in my code: > > print @array[0] ~ "|" ~ @array[1] ~ "|" ~ @array[2] ~ "\n"; > > However, your say join technique does not work. I will keep on it but > for now I am off to dinner! > > Thanks!, > Chris > > On 5/23/06, Gabor Szabo <[EMAIL PROTECTED]> wrote: >> On 5/23/06, Chris Yocum <[EMAIL PROTECTED]> wrote: >> > >> > 1|2|3 >> > >> > I would say something like: >> > >> > print $array[0] . "|" . $array[1] . "|" . $array[2] . "\n"; >> > >> > not the best way but it works. >> > >> > In Perl6 if say something like this: >> > >> > print @array[0] ~ "|" ~ @array[1] ~ "|" ~ @array[2] . "\n"; >> > >> > I get >> > >> > 1 2 3 | | | >> > >> > My question is: why is it doing that or, more to the point, what am >> I doing wrong? >> > >> >> I am not sure, maybe the . before "\n" cause the problem but why not >> try this one: >> >> my @array = (1, 2, 3); >> say join "|", @array; >> >> Gabor