home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


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!!";