my $var2 = do { if ( <cond1> ) { a; } else { y; } };
All three constructs are more-or-less interchangable and which one you use should be decided based on which is most readable in any particular instance.
In reply to Re^3: Variable Declaration
by nobull
in thread Variable Declaration
by pp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |