I tried this in linux machines
my $a = $ENV{HOSTNAME};
print "\nhostname = $a\n";
i get this,
hostname = sims5.eng.netapp.com
i tried same in Solaris, but i get nothing.
hostname =
I can use below code,
use Sys::Hostname;
$host = hostname;
but is there any other way of getting hostname without importing Sys::Hostname in solaris machines.
Thanks.