Expand|Select|Wrap|Line Numbers
- #!/user/bin/perl
- while ($a = <STDIN>)
- {
- if ($a =~ tr/A-Z/a-z/)
- {
- print "$a\n";
- }
- if ($a =~ tr/a-z/A-Z/)
- {
- print "the uppercase is $a\n";
- }
- elsif ($a =~ tr/[A-Z]/[a-z]/)
- {
- $b=$a;
- $b =~ tr/A-Z/a-z/c;
- print "$b\n";
- }
- }
but,the problem is i want the first letter of the output in uppercase and remaining in lowercase.