Convert mixed-case input : Case « String « Perl






Convert mixed-case input

   

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

   
    
    
  








Related examples in the same category

1.Convert all letters of $string to lowercase
2.Convert all letters of $string1 to uppercase
3.Convert input to lowercase and uppercase
4.Lower and upper case
5.Output the initial in lowercase and uppercase