Joel wrote:
> 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
Need a semicolon at end of this line.
>
> until ($a==0)
> {
> print "Counting down to 0 from $a";
> $a--;
> }
> else (print "Blast off!")
"else" cannot be used with "until"; only with "if". This line should just
read:
print "Blast off!";
HTH
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>