print "Please enter your name:\n"; chomp( $name = <> ); $x = ucfirst $name; print $x; #### # The \u metacharacter acts only upon the first character. # No need for substr. $x = "\u$name"; #### # Assuming Perl 5.14+ $x = $name =~ s/^(.)/\u$1/r; #### $x = $name; $x =~ s/^(.)/\u$1/;
## # The \u metacharacter acts only upon the first character. # No need for substr. $x = "\u$name"; ##
## # Assuming Perl 5.14+ $x = $name =~ s/^(.)/\u$1/r; ##
## $x = $name; $x =~ s/^(.)/\u$1/;