Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2015-07-31 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (277 votes), past polls