Perl: the Markov chain saw | |
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?? |
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
In Section
Seekers of Perl Wisdom
|
|