Perl Programming/Keywords/elsif

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Previous: else Keywords Next: END

The elsif keyword

[edit | edit source]

elsif is the keyword used to add another conditional branch to an if statement. The keywords else if do the same.

Syntax

[edit | edit source]
  if EXPRESSION elsif EXPRESSION [else EXPRESSION]

See also

[edit | edit source]
Previous: else Keywords Next: END