On Sat, Mar 12, 2005 at 08:37:52PM +0100, Juerd wrote: : Juerd skribis 2005-03-12 20:32 (+0100): : > My gut prefers that both scalar reverse LIST and ~LIST join LIST on ''. : : scalar reverse LIST probably returns an arrayref. : : I meant ~reverse LIST, which should probably do ~LIST at some point : instead of join($sep, LIST), for consistency, and my request is that ~ : join on '', not ' '.
Well, we thrashed that one around a lot at one of our meetings, and the general consensus was that array interpolation and the default stringification of arrays should probably work the same for consistency. (Likewise for hashes.) And that the default for both of those needs some whitespace. Basically we didn't want to have to explain why print "@foo[]" is different from print "[EMAIL PROTECTED]" On the other hand, without an argument, the method form of .join: print "[EMAIL PROTECTED]" is likely to join on ''. Or you could write print "@foo.join()" Or if we decide that's too likely to lead people to write something confusing like join(@foo) then we can come up with some other means of doing it succinctly, such as: cat(@foo) @foo.cat Or we could redefine the signature of join to make the delimiter a named optional parameter so that join(LIST) assumes a delimiter of ''. That might raise a few eyebrows though. And arguably, the current structure of join is that the delimiter is the invocant, so cat should be defined as ''.join(@foo) Larry