Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Perl style: Arguing against three-argument join()

by toolic (Bishop)
on Jan 24, 2008 at 16:57 UTC ( #664080=note: print w/replies, xml ) Need Help??


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...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://664080]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2016-12-10 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (164 votes). Check out past polls.