programming-examples/perl/Statement/Use an elsif statement to check if a different condition is true.pl

12 lines
253 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$subLang = <STDIN>;
chomp($subLang);
if ( $subLang eq "perl" ) {
print "Congratulations, you choose perl!\n";
} elsif ( $subLang eq "Tcl" ) {
print "Tcl is great, too.\n";
} else {
print "Well, use $subLang if you feel ";
}