Bootstrap FreeKB - Perl (Scripting) - Update the first character in a string to be upper case (ucfirst)
Perl (Scripting) - Update the first character in a string to be upper case (ucfirst)

Updated:   |  Perl (Scripting) articles

In this example, the $foo variable contains "hello world".

my $foo = "hello world";

 

The ucfirst (upper case first) operator can be used to update the first character to be upper case. In this example, the value to be "Hello world".

$foo = ucfirst($foo);

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 2ed30e in the box below so that we can be sure you are a human.