Jemand zu Hause?
1 2 3 4 5 6 7 8
use strict; use warnings; use Socket; # Hole IP von Kommandozeile my $ip = shift // die "IP fehlt!"; my $hostname = gethostbyaddr(inet_aton($ip), AF_INET); print $hostname;
1 2
use Socket qw( AF_INET6 inet_pton); my $hostname = gethostbyaddr(inet_pton(AF_INET6,'::1'),AF_INET6)
use strict; use warnings;