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


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: gethostent Perl in a Nutshell Next: Reference: getnetbyaddr
Reference: gethostent Book Index Reference: getnetbyaddr

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.