I have been using User::pwent to get the full name of the system user in Perl:
require User::pwent;
my $full_name = (User::pwent::getpwnam(getlogin)->gecos)[0];
However, getpwnam is not implemented in Windows Perl. What’s the alternative to get the user’s full name on Windows? Is it available?
Poked around, best thing I could find is to use
Win32API::Net::GetUserInfo():Need to get it running on a few Windows boxes though, to make sure it works.
Update: Confirmed to work with user info level 10:
Not sure why 1011 does not work as documented, but this is good enough for me.