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

 

- Info:

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

 

- Procedure:

  - Create "PERL Application" Test.pl.

 

    Test.pl

    $text   = "Hello";

    

    unless ($text eq "Hello"){ print "Text doesn't equals Hello."; }    #Same as if(!($text eq "Hello"))  

    else                     { print "Text         equals Hello."; }