Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: How to handle Net::Address::IP::Local'->public when we are not connected to internet

by Anonymous Monk
on Jan 19, 2015 at 17:50 UTC ( [id://1113792]=note: print w/replies, xml ) Need Help??


in reply to Re: How to handle Net::Address::IP::Local'->public when we are not connected to internet
in thread How to handle Net::Address::IP::Local'->public when we are not connected to internet

Hii, Thamks for the answer. I get this error from that code :
Unable to create UDP socket: A socket operation was attempted to an un +reachable network....
And don't this static IP return handle this error ? I mean doing this :
return $address='192.80.160.16';
should return return '192.80.160.16' instead of this error message. so how to get rid of this error and return '192.80.160.16' when there is no IP recived (when disconnected) otherwise return the real IP which it receives.
  • Comment on Re^2: How to handle Net::Address::IP::Local'->public when we are not connected to internet
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: How to handle Net::Address::IP::Local'->public when we are not connected to internet
by Laurent_R (Canon) on Jan 19, 2015 at 19:01 UTC
    Just don't print $@ if you don't want this message to be printed.

    Je suis Charlie.
Re^3: How to handle Net::Address::IP::Local'->public when we are not connected to internet
by Anonymous Monk on Jan 19, 2015 at 22:31 UTC
    Instead of using eval string, why don't you simply type it without all the extra quotes?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1113792]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found