PERL Tutorial Example: Use of IF control structure in PERL

PERL Tutorial Example: Use of IF control structure in PERL

PERL Example Base Tutorial: Use of IF control structure in PERL
 

create a file named "perl-tutorial-example-if.pl" then copy and paste the below code:

$MaritulStatus = "U";

print "My boss is Noor Hasan and he is :";

if($MaritulStatus eq "U")
{
    print "'Unmarried'";
}
 

PERL Example Base Tutorial: Use of IF control structure in PERL description

 Now run the program (perl-tutorial-example-if.pl) from your favourite command prompt & get the result as follows:
 

PERL Tutorial Example: Use of IF control structure in PERL - output in the command prompt

The output in the windows command prompt

No comments:

Post a Comment

leave your comments here..