my $inhalt; my $sock = new IO::Socket::INET ( Timeout => 25, Proto => tcp, PeerAddr => $host, PeerPort => 80 ) || die $!; binmode $sock, 'utf8'; $sock->autoflush(1); print $sock $header.$body; while(<$sock>){ $inhalt .= $_; } $sock->close();