Larry Wall skribis 2005-06-14 14:15 (-0700):
> On Tue, Jun 14, 2005 at 10:31:58PM +0200, Ingo Blechschmidt wrote:
> : You can use
> : say [~] @array; # "abcd" or
> : say @array.join(""); # "abcd" or
> : say join "", @array; # "abcd"
> : if you want to supress the spaces.
> I think a bare @array.join should also work.
I think it should not.
split splits on whitespace, stringification joins on whitespace, reverse
in scalar context joins on whitespace. It would be fair if join
defaulted to ' ' as well.
You suggested cat as a join assuming '' in an old thread. I still like
that idea.
[ 'a' .. 'e' ].join # "a b c d e"
[ 'a' .. 'e' ].cat # "abcde"
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html