Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: gethostentChapter 5
Function Reference
Next: Reference: getnetbyaddr
 

getlogin

getlogin

Returns the current login from /etc/utmp (Unix systems only), if any. If null, use getpwuid. For example:

$login = getlogin || getpwuid($<) || "Intruder!!";


Previous: Reference: gethostentPerl in a NutshellNext: Reference: getnetbyaddr
Reference: gethostentBook IndexReference: getnetbyaddr