P is for Practical | |
PerlMonks |
u+ fails to force scalar context to empty list assignment: +( () = ... )by rsFalse (Chaplain) |
on Mar 11, 2019 at 21:05 UTC ( [id://1231129]=perlquestion: print w/replies, xml ) | Need Help?? |
rsFalse has asked for the wisdom of the Perl Monks concerning the following question:
Hello. Today I've found that unary plus (u+) doesn't force scalar context to empty list assignment. Isn't this bug or DWIdon'tM? OUTPUT: an empty line. Overcome with same idea: OUTPUT: 3 Verbose overcome :) OUTPUT: 3 Interesting (I expected a compilation error here, similar as with number predecrement, e.g. --5): OUTPUT: 2
Back to
Seekers of Perl Wisdom
|
|