> -----Original Message-----
> Subject: Why does this keep happening?
> 
> I'm running perl under windows XP and I keep geting this error:
> 
> syntax error at (Directory and filename) Line 6, near " )
> {"
> syntax error at (directory and filename) line 9 near "}"
> 
> The source code is below, but this happens with loops in 
> general. Any ideas?
> 
> ------------------------------------------------
> #!usr/bin/perl
> 
> $a=1000
> 
> until ($a==0)
> {
> print "Counting down to 0 from $a";
> $a--;
> }
> else (print "Blast off!")
> 
> Joel

PS, $a and $b are bad choices for variable names in Perl. They are used
by sort().

I've always wondered why there isn't a warning generated for this ....

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to