Re: Don't require braces

2000-09-17 Thread Tom Christiansen
>I too would like C's one-line if/for/while syntax as a matter of >convenience, but I grudgingly admit that Perl's way more than >makes up in unambiguity what it loses in convenience. You have them, if you want them. --tom

Re: Don't require braces

2000-09-13 Thread Eric Roode
Raptor wrote: > >problem can be solved again in this way i.e. shell like syntax : > >while $i > 10 && $i++ && print $i; > >mean this > >while ($i > 10 ) {$i++; print $i}; But: $i=-5; while ($i<=5) && $i++ && print $i; doesn't mean the same as: $i=-5; while ($i<=5) {$i++; print $i} eve

Re: Don't require braces

2000-09-13 Thread Nathan Wiger
> problem can be solved again in this way i.e. shell like syntax : > > while $i > 10 && $i++ && print $i; > > mean this > > while ($i > 10 ) {$i++; print $i}; These don't mean the same thing - even in shell. The && requires truth. Hence the reason this: tar cBpf - . | ( cd /dest/dir && ta

Re: Don't require braces

2000-09-13 Thread raptor
hi, > so, > >while $i < 10 print $i; print $j; > > should become > >while ($i < 10) { print $i; print $j; } > > or > >while ($i < 10) { print $i; } print $j; > ??? ]- !!! ;") problem can be solved again in this way i.e. shell like syntax : while $i > 10 && $i++ && print $i; mean thi

Re: Don't require braces

2000-09-13 Thread Tad McClellan
On Wed, Sep 13, 2000 at 12:00:49PM +0100, raptor wrote: > I was thinking will it be good if the braces are used but not required for > while $i < 10 print $i; > mean > while ($i < 10) { print $i }; so, while $i < 10 print $i; print $j; should become while ($i < 10) { print $i; print

Re: Don't require braces

2000-09-13 Thread Walt Mankowski
On Wed, Sep 13, 2000 at 12:00:49PM +0100, raptor wrote: > hi, > > I was thinking will it be good if the braces are used but not required for > ops like while, until, if, unless ...etc... what I have in mind : > > if $x > 10 print $x; > work as > if ($x > 10) {print $x}; > > OR > > while $i <

Re: Don't require braces

2000-09-13 Thread Bart Lateur
On Wed, 13 Sep 2000 12:00:49 +0100, raptor wrote: >I was thinking will it be good if the braces are used but not required for >ops like while, until, if, unless ...etc... what I have in mind : > >if $x > 10 print $x; >work as >if ($x > 10) {print $x}; Eek! No! This is one of the things that I c