Capitalise first letter in Perl

Software

I don’t know how I’ve been a Perl hacker all this time and can never remember this. From Perldoc:

my $string = ucfirst $input;

So I don’t lose search result juice, this could have also been titled capitalize first letters in Perl. Which given Larry Wall is an American, I suppose it should be. Or should I say I’ve gotten used to this colorful, personalized language. The irony isn’t lost on me that I’ve spent more words and time on this explanation and paragraph than the rest of the post.

I also note that I capitalised the first letter in Perl, in advance of rediscovering the use of the aforementioned function. Aside from the letter I, it’s also the only word in the previous sentenace that was capitalised. I’ve spent Too Much Time™ thinking about this.

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!