Amit Saxena wrote:
> 
> On Fri, Jul 11, 2008 at 8:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> 
>> [EMAIL PROTECTED] wrote:
>>>
>>> Can you please advice me how to get the Clients' windows logon user
>>> name in perl?
>>
>>   $ENV{USERNAME}
>
> Using environment variables to find username are risky !
> 
> Is there any API available for the same?

(Please bottom post your replies to this group. Thanks.)

use Win32;

my $user = Win32::LoginName;

Rob

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to