Hostname: Difference between revisions
Content added Content deleted
(Add Factor example) |
m (Changed over to works with template) |
||
Line 4: | Line 4: | ||
=={{header|C}}== |
=={{header|C}}== |
||
{{works with|gcc|4.0.1}} |
|||
{{works with|POSIX|.1}} |
|||
'''Standard:''' [[POSIX.1]] |
|||
#include <limits.h> |
#include <limits.h> |
||
#include <unistd.h> |
#include <unistd.h> |
||
Line 31: | Line 29: | ||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
{{works with|Perl|5.8.6}} |
|||
'''Interpreter:''' [[perl]] 5.8.6 |
|||
use Sys::Hostname; |
use Sys::Hostname; |
||
Line 40: | Line 38: | ||
=={{header|Python}}== |
=={{header|Python}}== |
||
{{works with|Python|2.5}} |
|||
import socket |
import socket |
||
host = socket.gethostname() |
host = socket.gethostname() |