Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: How to get system user name from windows using perl

by Lotus1 (Curate)
on Nov 10, 2011 at 15:19 UTC ( #937397=note: print w/replies, xml ) Need Help??


in reply to Re: How to get system user name from windows using perl
in thread How to get system user name from windows using perl

Type SET at the command prompt to get a list of available environment variables on a Windows system.

$ENV{USERNAME} for example.

Replies are listed 'Best First'.
Re^3: How to get system user name from windows using perl
by Ralesk (Pilgrim) on Jan 27, 2012 at 15:52 UTC

    Caveat: %ENV is always byte semantics, if you have an oldish Windows and a username outside of the ANSI locale, you get question marks. One should be using Win32ís LoginName() instead which always returns character-shaped characters.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://937397]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2017-02-19 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (293 votes). Check out past polls.