browserice
Technical User
Is there a CASE command in Perl-4 ?
If so, what is its synthax ?
If so, what is its synthax ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
print "enter a color <red|green|blue> ";
my $color = <STDIN>;
chomp $color;
for ($color) {
/red/ and do {
print "You chose red!\n";
last;
};
/blue/ and do {
print "You chose blue!\n";
last;
};
/green/ and do {
print "You chose green!\n";
last;
};
print "You weren't following directions! $color wasn't "
. "a valid color choice!\n";
}