programming-examples/perl/Statement/Extend the if statement to include an else block.pl
2019-11-15 12:59:38 +01:00

13 lines
255 B
Perl

$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 ";
}