Perl: the Markov chain saw | |
PerlMonks |
Re: How do you grab username/login id in Unix?by htoug (Deacon) |
on Dec 02, 2004 at 07:04 UTC ( [id://411668]=note: print w/replies, xml ) | Need Help?? |
$ENV{LOGNAME} should do it in many cases. It has been defined as the username on all systems I have used. But the getpwxxx method that gaal showed is probably the best. It should work on more than just unix.
In Section
Seekers of Perl Wisdom
|
|