develooper Front page | perl.fwp | Postings from July 2003

Re: my if?

Thread Previous | Thread Next
From:
A. Pagaltzis
Date:
July 2, 2003 16:16
Subject:
Re: my if?
Message ID:
20030702231606.GA6041@klangraum
* Pense, Joachim <joachim.pense@eds.com> [2003-07-02 14:15]:
> You can write
> 
> if ($some_condition) {
>    do_this;
>    do_that;
>    do_something_else;
> }
> 
> and you can write
> 
> do_this if $some_condition;
> 
> You need not write
> 
> if ($some_condition) {do_this}

You can also write


do {
    do_this;
    do_that;
    do_something_else;
} if $some_condition;


so your second example is not really as restricted as you're
making it out to be. static() would be.

-- 
Regards,
Aristotle

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