http://www.perlmonks.org?node_id=940488


in reply to `hostname -s`

WARNING:

Don't use it in Solaris! Or your new hostname will be named "-s" :)

So use module suggested by Corion