perl-5.38.0
ucfirst EXPR
ucfirst

Returns the value of EXPR with the first character in uppercase (Unicode calls this titlecase). If EXPR is omitted, ucfirst uses $_.

最初の 文字だけを大文字(Unicode ではこれをタイトル文字と呼びます)にした、 EXPR を返します。 EXPR が省略されると、ucfirst$_ を使います。

    my $str = ucfirst("hello world!"); # "Hello world!"

This function behaves the same way under various pragmas, such as in a locale, as lc does.

この関数は、ロケールのようなさまざまなプラグマの影響下では、 lc と同様に振る舞います。

Note: This is the internal function implementing the \u escape in double-quoted strings.

注意: これは、ダブルクォート文字列における、\u エスケープを 実装する内部関数です。

    my $str = "\uperl\E is great"; # "Perl is great"