in reply to How do you grab username/login id in Unix?
$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