in reply to gethostbyname timing out or dns server can't find the host information

I imagine, in case of timeout, $! might be set, %! ought to have something  $! and die join ' ', grep( { $!{$_} } keys %! )
  • Comment on Re: gethostbyname timing out or dns server can't find the host information
  • Download Code

Replies are listed 'Best First'.
Re^2: gethostbyname timing out or dns server can't find the host information
by Anonymous Monk on Mar 11, 2013 at 23:14 UTC
    $ perl -le " print for grep /timeout/i, keys %!" ERROR_CTX_CLIENT_QUERY_TIMEOUT ERROR_CTX_MODEM_RESPONSE_TIMEOUT ERROR_TIMEOUT ERROR_COUNTER_TIMEOUT ERROR_SEM_TIMEOUT ERROR_SERVICE_REQUEST_TIMEOUT
Re^2: gethostbyname timing out or dns server can't find the host information
by kennzors (Initiate) on Mar 11, 2013 at 23:28 UTC

    hmm from http://perldoc.perl.org/perlvar.html

    Additionally, if the h_errno variable is supported in C, its value is returned via $? if any gethost*() function fails.

    would using $? work? tye also mentioned this value

      I've no idea, really
      $ perl -MData::Dump -E " gethostbyname(q(blocalhost)); dd $!,int$!,$?, + grep( { $!{$_} } keys %! ) " ("No such host is known.", 11001, 11001)