twain
twain

Reputation: 69

Perl syntax error - elseif should be elsif at

What do I need to change in the following Perl code?

perl -wc yields:

elseif should be elsif at cgitelnet-mod.pl line 410.
syntax error at cgitelnet-mod.pl line 411, near ")
    {"
syntax error at cgitelnet-mod.pl line 444, near "else"
syntax error at cgitelnet-mod.pl line 453, near "}"
Illegal declaration of subroutine main::PrintDownloadLinkPage at cgitelnet-mod.pl line 461.

The whole file can be found here: http://pastebin.com/7r5pfW5y

Upvotes: 2

Views: 7582

Answers (2)

frostmatthew
frostmatthew

Reputation: 3298

You need to remove the second e in elseif....Unlike many languages Perl spells it as elsif

Upvotes: 4

TLP
TLP

Reputation: 67908

You misspelled elsif. It is not else-if, remove the extra e and you should be fine.

Upvotes: 13

Related Questions