PERL Tutorial Example: Use of if-else control structure in perl
PERL Example Base Tutorial: Use of if-else control structure in perl
create a file named "perl-tutorial-example-if-else.pl" then copy and paste the below code:
$CanYou = "Yes";
print "Can you program in PERL? - ";
if($CanYou eq "Yes")
{
print "Yes i can";
}
else
{
print "Sorry boss!!! i don't/can't";
}
PERL Example Base Tutorial: Use of if-else control structure in perl description
Now run the program (perl-tutorial-example-if-else.pl) from command prompt & get the result as desired:

No comments:
Post a Comment
leave your comments here..