Perl Programming/Concept Index/case sensitivity
Jump to navigation Jump to search
The perl interpreter is case sensitive. This means that identifier names containing lowercase letters will be treated as being different and separate from those containing uppercase letters:
# These variables are all different $dog='Benjamin'; $Dog='Samba'; $DOG='Bernie'; print "The dogs are named $dog, $Dog, and $DOG \n"
Converting Strings[edit | edit source]
The perl interpreter provides the following functions for converting strings to uppercase or to lowercase: uc Converts a string to upper case lc Converts a string to lower case ucfirst Converts the first letter of a string to upper case lcfirst Converts the first letter of a string to lower case