title: Perl Net::SSLeay post_https how to detect no response from server
body: <p>I have been using
  <a href="https://metacpan.org/pod/Net::SSLeay" rel="nofollow noreferrer"><code>Net::SSLeay</code></a>
  for 20 years to post data to <code>authorize.net</code> and receive the reply, as shown below:</p>
  
  <pre><code>   ($reply_data, $reply_type, %reply_headers) =
                        post_https($host, $port, $script, '', $form_data);
  
          @data = split (/\,/, $reply_data);
  
          $FORM{'x_response_code'} = $data[0];
          $FORM{'x_response_reason_text'} = $data[3];
          $FORM{'x_auth_code'} = $data[4];
          $FORM{'x_amount'} = $data[9];
  
  if ($FORM{'x_response_code'} != 1) {... 
  </code></pre>
  
  <p><code>authorize.net</code> received the data and processed the payment, but my system did not receive a reply. The user got a server error, and tried submitting the form several more times, all which resulted in payment processing, but no reply from <code>authorize.net</code>. When comparing my logs with authorize.net's processing time, I see that there's about a fifteen minute lag time between when the call was sent, and when authorize.net processed the payment. All four attempts were completed before the first processing occurred. Authorize.net says there were no problems or changes on their end.</p>
  
  <p>How can I suppress the server error and instead return a custom error message?</p>