Perl String uc() Function - Quick Tutorial

How to use the string uc() function

people looking at computer monitor
Yuri_Arcurs / Getty Images
 $STRING = uc($STRING); 

Perl's uc() function takes a string, makes the entire thing uppercase, and then returns the new string.

 $myWord = 'word';
 $myUpperWord = uc($myWord); 

First, $myWord is set to a value of 'word', then the uc() function is run on $myWord. The uc() function takes the entire string $myWord and converts it to it's uppercase equivalent. The value of $myUpperWord is then equal to 'WORD.'

Format
mla apa chicago
Your Citation
Brown, Kirk. "Perl String uc() Function - Quick Tutorial." ThoughtCo, Oct. 21, 2017, thoughtco.com/perl-string-uc-function-quick-tutorial-2641193. Brown, Kirk. (2017, October 21). Perl String uc() Function - Quick Tutorial. Retrieved from https://www.thoughtco.com/perl-string-uc-function-quick-tutorial-2641193 Brown, Kirk. "Perl String uc() Function - Quick Tutorial." ThoughtCo. https://www.thoughtco.com/perl-string-uc-function-quick-tutorial-2641193 (accessed November 24, 2017).