PerlOnTheWay has asked for the wisdom of the Perl Monks concerning the following question:
if (... and do { ($result) = func($param); $result })
if (... and (($result) = func($param)))
I think the 2nd form is much nicer,
is there any special reason for using the 1st form?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is there any difference between these two statement?
by ikegami (Patriarch) on Dec 05, 2011 at 07:52 UTC | |
|
Re: Is there any difference between these two statement?
by GrandFather (Saint) on Dec 05, 2011 at 07:17 UTC | |
|
Re: Is there any difference between these two statement?
by Corion (Patriarch) on Dec 05, 2011 at 07:25 UTC | |
|
Re: Is there any difference between these two statement?
by JavaFan (Canon) on Dec 05, 2011 at 08:00 UTC | |
|
Re: Is there any difference between these two statement?
by TJPride (Pilgrim) on Dec 05, 2011 at 13:42 UTC |