Which of the following is used in perl?
-
else if
-
elseif
-
elsif
-
elif
C
Correct answer
Explanation
Perl uses 'elsif' for conditional chains (note the missing 'e'). This differs from C-style 'else if' and shell-style 'elif'. Option C shows the correct Perl syntax. This is a common point of confusion for programmers coming from other languages.