1.

What are conditional statements in Perl? What are its types?

Answer»

The conditional statement in Perl helps in making decisions. Based on that decision, a valid Perl statement or set of instructions gets executed. Through conditional STATEMENTS, a programmer checks a condition or set of conditions. Perl caters to 7 different TYPES of conditional statements. These are: 

  • if statement 
  • if-ELSE statement 
  • If-elsif statement 
  • unless statement 
  • unless else statement 
  • unless...elsif..else 
  • switch 


Discussion

No Comment Found