·  PERL – Syntax – Conditional Statements – if ... else

 

- Info:

  - This tutorial shows how to use if...else conditional statement.

 

- Procedure:

  - Create "PERL Application" Test.pl.

 

    Test.pl

    $number = 10;

    $text   = "Hello";

    

    if    ($number == 10     ) { print "Number = 10";       }    

    elsif ($text   eq "Hello") { print "Text equals Hello"; }

    else                       { print "No match found";    }