http://www.perlmonks.org?node_id=664080


in reply to Perl style: Arguing against three-argument join()

Since you are soliciting opinions, I think your first version is an unusual usage of join. I think the most strightforward is your 3rd version (simple concatenation). And I do not think of join as being a three-argument function, as your title suggests. I think of is as two-agrument: an expression for the separator and a list.
  • Comment on Re: Perl style: Arguing against three-argument join()

Replies are listed 'Best First'.
Re^2: Perl style: Arguing against three-argument join()
by martin (Friar) on Jan 24, 2008 at 17:38 UTC
    And I do not think of join as being a three-argument function, as your title suggests. I think of is as two-argument: an expression for the separator and a list.

    toolic, you are right, I probably should have said "three-argument usage of join" or "pseudo-separator, two-element list usage of join".

    On second thought, I might settle now for "abusing middle element of three-element list as join() separator" or something. If we take this much further we might be able to squeeze the whole discussion into a headline...