>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
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
> 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
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
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
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 <
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