develooper Front page | perl.perl5.porters | Postings from April 2012

Re: proposal: functional C<if>

Thread Previous | Thread Next
From:
Eric Brine
Date:
April 27, 2012 17:56
Subject:
Re: proposal: functional C<if>
Message ID:
CALJW-qGeXB75r_eLUJqDwj=v1PPJDT90O09YCkdBeF+DF1Hoew@mail.gmail.com
On Fri, Apr 27, 2012 at 4:06 PM, Jesse Luehrs <doy@tozt.net> wrote:

>
> Subroutines (and do blocks) return the value of the last expression that
> was evaluated in their body. In your examples, the last expression that
> was evaluated happened to be the final statement in the block of an if
> statement. This doesn't mean that the if statement itself somehow turned
> into an if expression.
>

Actually, it does. It's the very definition of an expression.


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