perl-5.38.0
getlogin

This implements the C library function of the same name, which on most systems returns the current login from /etc/utmp, if any. If it returns the empty string, use getpwuid.

これは同じ名前の C ライブラリ関数を実装していて、 多くのシステムでは、もしあれば、/etc/utmp から現在のログイン名を返します。 もし空文字列が返ってきた場合は、getpwuid を 使ってください。

    my $login = getlogin || getpwuid($<) || "Kilroy";

Do not consider getlogin for authentication: it is not as secure as getpwuid.

getlogin を認証に使ってはいけません: これは getpwuid のように安全ではありません。

Portability issues: "getlogin" in perlport.

移植性の問題: "getlogin" in perlport