Perl if语句后面可以跟随可选的else语句,该语句在布尔表达式为false时执行。
Perl if else - 语法
perl编程语言中if.else语句的语法是-
if(boolean_expression) { # statement(s) will execute if the given condition is true } else { # statement(s) will execute if the given condition is false }
Perl if语句后面可以跟随可选的else语句,该语句在布尔表达式为false时执行。
perl编程语言中if.else语句的语法是-
if(boolean_expression) { # statement(s) will execute if the given condition is true } else { # statement(s) will execute if the given condition is false }