Only change first letter to uppercase : ucfirst « String « Perl






Only change first letter to uppercase

    

#!/usr/bin/perl

use warnings;
use strict;

my $string = "hello there\n";
print "The original string: ", 'hello there\n', "\n\n";

$string = ucfirst( $string );
print "First letter changed to uppercase: $string \n";

   
    
    
    
  








Related examples in the same category

1.Capitalize with ucfirst
2.Using ucfirst function