On Jul 11, 11:59 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > 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
Hi Rob, It show "SYSTEM" when I user my $user = Win32::LoginName;, I logon my windows with user name, but it show "SYSTEM" instead of my window user name. When I try user $ENV{USERNAME}, it show null. Please advice. Thanks & Regards, Leo. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/