Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Answer: Converting an IP from hexadecimal to dotted-quad

( #193703=categorized answer: print w/ replies, xml ) Need Help??

Q&A > data formatting > Converting an IP from hexadecimal to dotted-quad contributed by jmcnamara

You could also do it as follows, although it's still probably not as fast as the pack/unpack method:
join '.', map { hex } $ip =~ /../g;

Comment on Answer: Converting an IP from hexadecimal to dotted-quad
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2014-08-01 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (258 votes), past polls