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

by
Jeremy Canfield |
Updated: March 09 2020
| 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