Perl syntax error - elseif should be elsif at

Any ideas on what I need to change in this Perl code?

perl -wc gives:

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

Any help is much appreciated!

+4
source share
2 answers

You are mistaken elsif . This is not else - if , remove the extra e , and you should be fine.

+13
source

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

+4
source

Source: https://habr.com/ru/post/1369323/


All Articles