start page | rating of books | rating of authors | reviews | copyrights

Programming Perl

Programming PerlSearch this book
Previous: 3.2.49 gethostent Chapter 3
Functions
Next: 3.2.51 getnetbyaddr
 

3.2.50 getlogin

getlogin

This function returns the current login from /etc/utmp , if any. If null, use getpwuid . For example:

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


Previous: 3.2.49 gethostent Programming Perl Next: 3.2.51 getnetbyaddr
3.2.49 gethostent Book Index 3.2.51 getnetbyaddr