Using If and unless statement

วันจันทร์ที่ 14 กันยายน พ.ศ. 2552

Sentence review the terms of the Perl language instructions check the following conditions.

- If that distinction is out.

- Command if ().

if ($ number == 1) (.

).

if ($ string eq "welcome") (.

).

- Command if () else ().

if ($ number == 1) (.

) Else (.

).

- Command if () elsif ().

if ($ number == 1) (.

) Elsif ($ number == 2) (.

).

- Command if () elsif () else ().

if ($ number == 1) (.

) Elsif ($ number == 2) (.

) Else (.

).

- Unless the audit condition is another concern. Used in the opposite if (or other words meaning equal concern else).

unless ($ number == 1) (.

).

# This means that if the variable $ number is not equal to 1.

0 ความคิดเห็น:

แสดงความคิดเห็น

 
 
 
 
Copyright © Basic Perl