Situation:
Want to get the host name which the perl script running on.
====
Solution:
The macro `hostname` helps us to get host name.
Note that `hostname` is not 'hostname'. You need to use `, the key which also send ~ on keyboard.
i.e.
$host_name = `hostname`;
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言