develooper Front page | perl.perl5.porters | Postings from September 2011

Re: [perl #100364] exit doesn't match its documentation

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
September 29, 2011 08:09
Subject:
Re: [perl #100364] exit doesn't match its documentation
Message ID:
19527.1317308940@chthon
"H.Merijn Brand" <h.m.brand@xs4all.nl> wrote
   on Thu, 29 Sep 2011 16:39:02 +0200: 

>If I read this I read it as '(   print (3 + 5)     ) * 8;'
>unambiguously

>>     return (3+5)*8;

>useless use of '*8' in statement at line ...

Nope.  It's surprising how many people misunderstand that!

Witness:

    % perl -le 'sub trick { return (3+5)*8 } print trick()'
    64

It is parsed completely differently!!

--tom

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About