Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Re: Tutorial suggestion: split and join

by zby (Vicar)
on Aug 29, 2003 at 07:47 UTC ( #287607=note: print w/ replies, xml ) Need Help??

in reply to Re: Tutorial suggestion: split and join
in thread Tutorial suggestion: split and join

The converse to split is the join function, which takes a list of strings and joins them together again.

No. The converse to a split is a regular expression (with matching). The idea here is that with matching you specify what you want to match and you get that as a return value ala @simpsons = "Bart Lisa Maggie Marge Homer" =~ /(\w+)/g). With split you specify all the things you don't want and you get everything else. Which one you use depends on what is more natural to specify.

I don't understand what meaning of converse you use here. English is not my first language - but here is what I found for 'converse' in the Meriam-Webster online dictionary:
something reversed in order, relation, or action: as a : a theorem formed by interchanging the hypothesis and conclusion of a given theorem b : a proposition obtained by interchange of the subject and predicate of a given proposition <"no P is S " is the converse of "no S is P ">
I believe the OP used 'converse' as a synonim for 'inverse' in the mathematical sense, i.e. he wanted to say that  split o join = identity. Which is quite close to being correct.

Or perhaps you meant join in the first sentence? This possibillity occured to me just after posting this comment.

Comment on Re: Re: Tutorial suggestion: split and join
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://287607]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (15)
As of 2014-12-19 20:26 GMT
Find Nodes?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?

    Results (91 votes), past polls