in reply to Re: Templates for Perl Programs and Perl Modules
in thread Templates for Perl Programs and Perl Modules
tomy $userid= POSIX::cuserid(); my $author = (getpwnam($userid))[6];
my $author = "Your Name Here";
The trick for getting the 'real name' of a user on unix uses the user id with cuserid() and the corresponding entry in /etc/passwd with getpwnam(). It will be interesting to figure out how to get this information from a Windows box.
Thanks!
It should work perfectly the first time! - toma
|
|---|