We don't bite newbies here... much | |
PerlMonks |
Re^4: Undocumented join() feature, now defunct? (++$i)by Loops (Curate) |
on Oct 30, 2014 at 03:12 UTC ( [id://1105577]=note: print w/replies, xml ) | Need Help?? |
Yes, okay I see that. To expect otherwise would require the creation of a temporary every time you access a scalar more than once in your code. One implication of executable code being well defined as the first parameter to join, is that the following will fix johngg's code to work on old and new versions of Perl: <c>say join $inc+0, @arr;Where the creation of a temporary to hold the result is implied.
In Section
Seekers of Perl Wisdom
|
|