in reply to Re: Surprised by join
in thread Surprised by join

Yes indeed, map also does the trick, I'm just surprised that join doesn't, not without help anyway.

 

Replies are listed 'Best First'.
Re^3: Surprised by join
by pelagic (Priest) on Jun 08, 2004 at 13:54 UTC
    join does not set $_ to each element obviously. And why is that so? Ask Larry!

    pelagic

      I will ask next time I meet him :)

      As I speculated above, it might not make sense to set $_ to each element since each step of the join must work on a pair of elements.

       

        >    must work on a pair of elements
        Yep, that must be the reason. Somewhat similar to sorting maybe (with $a and $b). Probably it's not a very popular requirement to join with a variable join-string.

        pelagic
        Go ahead and ask him. :-)

        ------
        We are the carpenters and bricklayers of the Information Age.

        Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

        I shouldn't have to say this, but any code, unless otherwise stated, is untested