On Mon, 24 Jun 2013 17:14:02 -0400
Brandon McCaig <bamcc...@gmail.com> wrote:

> I think that you are just misunderstanding what is happening
> here. `perldoc perlsyn' explains it. These are actually two
> different things. The compound if-statement, which is typical of
> other languages, and the if-style "statement modifier". The
> syntax of the statement modifier is:
> 
> STATEMENT if EXPR;
> 
> Where STATEMENT is a single statement (what that statement is
> doesn't really matter, though the documentation does say
> "simple" so perhaps there is a limit).

Actually, if you use a do BLOCK, there's no limit.

    perl -E'do{ say "hello"; say "world"; } if 1;'


-- 
Don't stop where the ink does.
        Shawn

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to