Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl syntax error - elseif should be elsif at

Tags:

syntax

perl

Any ideas of what I need to change in this 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.

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

Any help is greatly appreciated!

like image 277
twain Avatar asked Dec 03 '22 07:12

twain


2 Answers

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

like image 150
TLP Avatar answered Dec 22 '22 16:12

TLP


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

like image 41
frostmatthew Avatar answered Dec 22 '22 15:12

frostmatthew