Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: join doesn't seem to insert separators

by sintadil (Pilgrim)
on Sep 13, 2004 at 23:26 UTC ( [id://390701]=note: print w/replies, xml ) Need Help??


in reply to join doesn't seem to insert separators

print join(/:/,"dog","day","afternoon");

What zdog didn't mention is that join() doesn't take a regular expression as its first argument like split() does. Instead, it takes an expression that yields something that Perl can transform into a string.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-03-28 18:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found