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.
Comment on
Re: Retrieving an NT machine name?
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}
[download]
HTH...
#!/home/bbq/bin/perl
# Trust no1!
[reply]
[d/l]
In Section
Seekers of Perl Wisdom