Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写一个脚本,它将所有字母从小写转换为大写而不使用该uc()函数。
uc()
你可以使用类似的东西$str =~ tr/a-z/A-Z/,但uc如果它对你很重要的话,它可能更适合 Unicode 支持。
$str =~ tr/a-z/A-Z/
uc
使用正则表达式:
$str =~ s/(.)/\u$1/g;