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

Re: Manually adding delimiters instead of join()

by kvale (Monsignor)
on Oct 12, 2004 at 17:26 UTC ( [id://398615]=note: print w/replies, xml ) Need Help??


in reply to Manually adding delimiters instead of join()

The answer is that your particular delimiter '::' has syntactic significance in Perl -- it is the package delimiter. Thus the first form is parsed as a (rather gnarly) package variable. But the second does what you want: substitute each variable individually and then join with the syntax sensitive ::.

If your delimiter had been something more benign, like whitespace, both forms would work.

-Mark

  • Comment on Re: Manually adding delimiters instead of join()

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found