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

++ I like this, although I'm starting to think that I had just misunderstood join and should probably go with an alternate solution rather than shoehorn join to my way of thinking.

 

Replies are listed 'Best First'.
Re^3: Surprised by join
by eserte (Deacon) on Jun 08, 2004 at 14:11 UTC
    Somewhere else in this thread $a and $b were mentioned. The snippet above could be changed to use this. Instead of

    $res .= $sub->($_[$i-1], $_[$i]) . $_[$i];

    it would be

    local $a = $_[$i-1]; local $b = $_[$i]; $res .= $sub->() . $_[$i];
    (Untested)