programming-examples/perl/String/Convert mixed-case input.pl
2019-11-15 12:59:38 +01:00

12 lines
322 B
Perl

while ($Input = <>) {
print "\L$Input\E";
print "\L$Input";
chop $Input;
if ("\L$Input" eq "lowercase") {
print "Found lowercase\n";
}
print "\U$Input\n";
if ("\U$Input" eq "UPPERCASE") {
print "Found UPPERCASE\n";
}
}