You can also try getting the hostname without calling an external program:
perl -MPOSIX -le 'print((uname)[1])'
In reply to Re: not getting hostname correctly on UNIX
by Celada
in thread not getting hostname correctly on UNIX
by slavam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |