# # Request/Response-Zyklus mit umrahmendem Timeout und erster # Auswertung: sub tu_https {  my ($site, $port, $req, $timeout ) = @_;  my ($response, $headers, $page, $errs, $http);      # HTTP - Rohdaten:  $timeout = 6 if ! defined $timeout;   # eigentliche Anfrage - geschutzt durch ALARM  eval  {    local $SIG{ALRM} = sub { warn "sslcat $site:$port timeout"; $errs = 1; };    alarm($timeout);     # $http: enthalt die komplette Antwort. Zeilen enden in CRLF     # $errs: enthalt Fehlermeldung; Leerstring fur: OK.    ($http, $errs) = sslcat($site, $port, $req);    alarm(0);  };   #   # falls eval schief ging:  if ( $@ )  { $errs = "$0: $$: sslcat failed. $@ $timeout Secs.\n";    print STDERR "EVAL FEHLER '$@' $timeout Secs !!!!\n";  }   # print STDERR "******** Zurueck! :\nHTTP='$http'\nERRS='$errs'\n";   #   # den Fehlerfall fuhren wir auf eine Response zuruck:   #  if ( $errs )  { $http = "HTTP/1.0 900 NET OR SSL ERROR\r\n\r\n$errs";  }  elsif ( "$http" eq ""  ) # xyundef warum ? noch analysieren  { $http = "HTTP/1.0 901 EMPTY ANSWER\r\n\r\nHTTP='$http'\r\n";  }  elsif ( $http !~ /^http/i ) # xyundef warum ? noch analysieren  { $http = "HTTP/1.0 902 SCHROTT ANSWER\r\n\r\nHTTP='$http'\r\n";    print STDERR "MUELLMUELL: '$http'\n";  }  return ( $http ); }