ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl6-language
perl6-language
Re: Hyper-concat
by Juerd other posts by this author
Jun 14 2005 2:33PM messages near this date
Re: Hyper-concat | Re: Hyper-concat
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
Thread:
Thomas Klausner
Ingo Blechschmidt
Larry Wall
Juerd
Larry Wall
Juerd
Rod Adams
Darren Duncan
Juerd

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved