I remember having used the variable $OSNAME in linux.
Currently I'm working on a project on Solaris where I need to get the OS name and that variable is not working on Solaris.
Even a simple one line program does not work:
print "OS is $OSNAME\n";
it prints
OS is
Please help.