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 null, use "getpwuid". $login = getlogin || getpwuid($<) || "Kilroy"; #### perl -e 'print getlogin || getpwuid($<)' lanx