Perl conditional statements


  Translation results:

Perl is the abbreviation of Practical Extraction and Report Language, which can be translated as "Practical Report Extraction Language".

Perl is a high-level, general-purpose, literal, dynamic programming language.

Perl was originally designed by Larry Wall and was published on December 18, 1987.

Perl borrows features from C, sed, awk, shell scripts, and many other programming languages.

The most important feature of Perl is that Perl integrates regular expression functions and the huge third-party code library CPAN.

Perl conditional statementssyntax

Perl conditional statements are blocks of code that are executed based on the execution results (True or False) of one or more statements.

Perl conditional statementsexample

#!/usr/local/bin/perl
$name = "Rookie Tutorial";
$favorite = 10; # Number of likes
$status = ($favorite > 60 )? "Popular website" : "Not a popular website";
print "$name - $status\n";

Popular Recommendations

Home

Videos

Q&A