in reply to Retrieving an NT machine name?

the Sys::Hostname module that comes with perl should return the hostname regardless of which OS you are running on.

Replies are listed 'Best First'.
RE: Re: Retrieving an NT machine name?
by BBQ (Curate) on Jul 18, 2000 at 08:52 UTC
    Or for strictly Windows machines (don't know of any other's that have this particular environment variable) you can use:
    $ENV{COMPUTERNAME}
    HTH...

    #!/home/bbq/bin/perl
    # Trust no1!