http://www.perlmonks.org?node_id=435786


in reply to Re: Perl oddities
in thread Perl oddities

Re the last one, it should simply be gotten rid of. The reason it's there is to keep you from accidentally saying print (1+2)/3;. That now gives /both/ a useless use of division in void context and a print interpreted as function. The "print interpreted as function" was there long before the "... in void context"; the later is more useful, but was harder for perl to notice.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).